diff --git a/hello_nexus/README.md b/hello_nexus/README.md new file mode 100644 index 00000000..bf26ce47 --- /dev/null +++ b/hello_nexus/README.md @@ -0,0 +1,37 @@ +This sample shows how to define a Nexus service, implement the operation handlers, and +call the operations from a workflow. + +### Sample directory structure + +- [service.py](./service.py) - shared Nexus service definition +- [caller](./caller) - a caller workflow that executes Nexus operations, together with a worker and starter code +- [handler](./handler) - Nexus operation handlers, together with a workflow used by one of the Nexus operations, and a worker that polls for both workflow and Nexus tasks. + + +### Instructions + +Start a Temporal server. (See the main samples repo [README](../README.md)). + +Run the following: + +``` +temporal operator namespace create --namespace hello-nexus-basic-handler-namespace +temporal operator namespace create --namespace hello-nexus-basic-caller-namespace + +temporal operator nexus endpoint create \ + --name hello-nexus-basic-nexus-endpoint \ + --target-namespace hello-nexus-basic-handler-namespace \ + --target-task-queue my-handler-task-queue \ + --description-file hello_nexus/endpoint_description.md +``` + +In one terminal, run the Temporal worker in the handler namespace: +``` +uv run hello_nexus/handler/worker.py +``` + +In another terminal, run the Temporal worker in the caller namespace and start the caller +workflow: +``` +uv run hello_nexus/caller/app.py +``` diff --git a/hello_nexus/__init__.py b/hello_nexus/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/hello_nexus/caller/__init__.py b/hello_nexus/caller/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/hello_nexus/caller/app.py b/hello_nexus/caller/app.py new file mode 100644 index 00000000..40785b90 --- /dev/null +++ b/hello_nexus/caller/app.py @@ -0,0 +1,43 @@ +import asyncio +import uuid +from typing import Optional + +from temporalio.client import Client +from temporalio.worker import Worker + +from hello_nexus.caller.workflows import CallerWorkflow +from hello_nexus.service import MyOutput + +NAMESPACE = "hello-nexus-basic-caller-namespace" +TASK_QUEUE = "hello-nexus-basic-caller-task-queue" + + +async def execute_caller_workflow( + client: Optional[Client] = None, +) -> tuple[MyOutput, MyOutput]: + client = client or await Client.connect( + "localhost:7233", + namespace=NAMESPACE, + ) + + async with Worker( + client, + task_queue=TASK_QUEUE, + workflows=[CallerWorkflow], + ): + return await client.execute_workflow( + CallerWorkflow.run, + arg="world", + id=str(uuid.uuid4()), + task_queue=TASK_QUEUE, + ) + + +if __name__ == "__main__": + loop = asyncio.new_event_loop() + try: + results = loop.run_until_complete(execute_caller_workflow()) + for output in results: + print(output.message) + except KeyboardInterrupt: + loop.run_until_complete(loop.shutdown_asyncgens()) diff --git a/hello_nexus/caller/workflows.py b/hello_nexus/caller/workflows.py new file mode 100644 index 00000000..240b8b8c --- /dev/null +++ b/hello_nexus/caller/workflows.py @@ -0,0 +1,35 @@ +from temporalio import workflow + +with workflow.unsafe.imports_passed_through(): + from hello_nexus.service import MyInput, MyNexusService, MyOutput + +NEXUS_ENDPOINT = "hello-nexus-basic-nexus-endpoint" + + +# This is a workflow that calls two nexus operations. +@workflow.defn +class CallerWorkflow: + # An __init__ method is always optional on a workflow class. Here we use it to set the + # nexus client, but that could alternatively be done in the run method. + def __init__(self): + self.nexus_client = workflow.create_nexus_client( + service=MyNexusService, + endpoint=NEXUS_ENDPOINT, + ) + + # The workflow run method invokes two nexus operations. + @workflow.run + async def run(self, name: str) -> tuple[MyOutput, MyOutput]: + # Start the nexus operation and wait for the result in one go, using execute_operation. + wf_result = await self.nexus_client.execute_operation( + MyNexusService.my_workflow_run_operation, + MyInput(name), + ) + # Alternatively, you can use start_operation to obtain the operation handle and + # then `await` the handle to obtain the result. + sync_operation_handle = await self.nexus_client.start_operation( + MyNexusService.my_sync_operation, + MyInput(name), + ) + sync_result = await sync_operation_handle + return sync_result, wf_result diff --git a/hello_nexus/endpoint_description.md b/hello_nexus/endpoint_description.md new file mode 100644 index 00000000..9a381cd0 --- /dev/null +++ b/hello_nexus/endpoint_description.md @@ -0,0 +1,3 @@ +## Service: [MyNexusService](https://github.com/temporalio/samples-python/blob/main/hello_nexus/basic/service.py) + - operation: `my_sync_operation` + - operation: `my_workflow_run_operation` diff --git a/hello_nexus/handler/__init__.py b/hello_nexus/handler/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/hello_nexus/handler/service_handler.py b/hello_nexus/handler/service_handler.py new file mode 100644 index 00000000..1295abd1 --- /dev/null +++ b/hello_nexus/handler/service_handler.py @@ -0,0 +1,49 @@ +""" +This file demonstrates how to implement a Nexus service. +""" + +from __future__ import annotations + +import uuid + +import nexusrpc +from temporalio import nexus + +from hello_nexus.handler.workflows import WorkflowStartedByNexusOperation +from hello_nexus.service import MyInput, MyNexusService, MyOutput + + +@nexusrpc.handler.service_handler(service=MyNexusService) +class MyNexusServiceHandler: + # You can create an __init__ method accepting what is needed by your operation + # handlers to handle requests. You typically instantiate your service handler class + # when starting your worker. See hello_nexus/basic/handler/worker.py. + + # This is a nexus operation that is backed by a Temporal workflow. The start method + # starts a workflow, and returns a nexus operation token. Meanwhile, the workflow + # executes in the background; Temporal server takes care of delivering the eventual + # workflow result (success or failure) to the calling workflow. + # + # The token will be used by the caller if it subsequently wants to cancel the Nexus + # operation. + @nexus.workflow_run_operation + async def my_workflow_run_operation( + self, ctx: nexus.WorkflowRunOperationContext, input: MyInput + ) -> nexus.WorkflowHandle[MyOutput]: + return await ctx.start_workflow( + WorkflowStartedByNexusOperation.run, + input, + id=str(uuid.uuid4()), + ) + + # This is a Nexus operation that responds synchronously to all requests. That means + # that unlike the workflow run operation above, in this case the `start` method + # returns the final operation result. + # + # Sync operations are free to make arbitrary network calls, or perform CPU-bound + # computations. Total execution duration must not exceed 10s. + @nexusrpc.handler.sync_operation + async def my_sync_operation( + self, ctx: nexusrpc.handler.StartOperationContext, input: MyInput + ) -> MyOutput: + return MyOutput(message=f"Hello {input.name} from sync operation!") diff --git a/hello_nexus/handler/worker.py b/hello_nexus/handler/worker.py new file mode 100644 index 00000000..0bdd6c01 --- /dev/null +++ b/hello_nexus/handler/worker.py @@ -0,0 +1,46 @@ +import asyncio +import logging +from typing import Optional + +from temporalio.client import Client +from temporalio.worker import Worker + +from hello_nexus.handler.service_handler import MyNexusServiceHandler +from hello_nexus.handler.workflows import WorkflowStartedByNexusOperation + +interrupt_event = asyncio.Event() + +NAMESPACE = "hello-nexus-basic-handler-namespace" +TASK_QUEUE = "my-handler-task-queue" + + +async def main(client: Optional[Client] = None): + logging.basicConfig(level=logging.INFO) + + client = client or await Client.connect( + "localhost:7233", + namespace=NAMESPACE, + ) + + # Start the worker, passing the Nexus service handler instance, in addition to the + # workflow classes that are started by your nexus operations, and any activities + # needed. This Worker will poll for both workflow tasks and Nexus tasks (this example + # doesn't use any activities). + async with Worker( + client, + task_queue=TASK_QUEUE, + workflows=[WorkflowStartedByNexusOperation], + nexus_service_handlers=[MyNexusServiceHandler()], + ): + logging.info("Worker started, ctrl+c to exit") + await interrupt_event.wait() + logging.info("Shutting down") + + +if __name__ == "__main__": + loop = asyncio.new_event_loop() + try: + loop.run_until_complete(main()) + except KeyboardInterrupt: + interrupt_event.set() + loop.run_until_complete(loop.shutdown_asyncgens()) diff --git a/hello_nexus/handler/workflows.py b/hello_nexus/handler/workflows.py new file mode 100644 index 00000000..a41b29ef --- /dev/null +++ b/hello_nexus/handler/workflows.py @@ -0,0 +1,12 @@ +from temporalio import workflow + +with workflow.unsafe.imports_passed_through(): + from hello_nexus.service import MyInput, MyOutput + + +# This is the workflow that is started by the `my_workflow_run_operation` nexus operation. +@workflow.defn +class WorkflowStartedByNexusOperation: + @workflow.run + async def run(self, input: MyInput) -> MyOutput: + return MyOutput(message=f"Hello {input.name} from workflow run operation!") diff --git a/hello_nexus/service.py b/hello_nexus/service.py new file mode 100644 index 00000000..6528775d --- /dev/null +++ b/hello_nexus/service.py @@ -0,0 +1,33 @@ +""" +This is a Nexus service definition. + +A service definition defines a Nexus service as a named collection of operations, each +with input and output types. It does not implement operation handling: see the service +handler and operation handlers in hello_nexus.handler.nexus_service for that. + +A Nexus service definition is used by Nexus callers (e.g. a Temporal workflow) to create +type-safe clients, and it is used by Nexus handlers to validate that they implement +correctly-named operation handlers with the correct input and output types. + +The service defined in this file features two operations: echo and hello. +""" + +from dataclasses import dataclass + +import nexusrpc + + +@dataclass +class MyInput: + name: str + + +@dataclass +class MyOutput: + message: str + + +@nexusrpc.service +class MyNexusService: + my_sync_operation: nexusrpc.Operation[MyInput, MyOutput] + my_workflow_run_operation: nexusrpc.Operation[MyInput, MyOutput] diff --git a/open_telemetry/worker.py b/open_telemetry/worker.py index 4b344123..04095ca7 100644 --- a/open_telemetry/worker.py +++ b/open_telemetry/worker.py @@ -3,7 +3,7 @@ from opentelemetry import trace from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter -from opentelemetry.sdk.resources import SERVICE_NAME, Resource +from opentelemetry.sdk.resources import SERVICE_NAME, Resource # type: ignore from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor from temporalio import activity, workflow diff --git a/pyproject.toml b/pyproject.toml index b26457f9..b264bf87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }] requires-python = "~=3.9" readme = "README.md" license = "MIT" -dependencies = ["temporalio>=1.14.0,<2"] +dependencies = ["temporalio>=1.14.1,<2"] [project.urls] Homepage = "https://github.com/temporalio/samples-python" @@ -22,7 +22,9 @@ dev = [ "pytest>=7.1.2,<8", "pytest-asyncio>=0.18.3,<0.19", "frozenlist>=1.4.0,<2", + "pyright>=1.1.394", "types-pyyaml>=6.0.12.20241230,<7", + "pytest-pretty>=1.3.0", ] bedrock = ["boto3>=1.34.92,<2"] dsl = [ @@ -44,9 +46,12 @@ langchain = [ "tqdm>=4.62.0,<5", "uvicorn[standard]>=0.24.0.post1,<0.25", ] +nexus = [ + "nexus-rpc>=1.1.0,<2", +] open-telemetry = [ "temporalio[opentelemetry]", - "opentelemetry-exporter-otlp-proto-grpc==1.18.0", + "opentelemetry-exporter-otlp-proto-grpc", ] openai-agents = [ "openai-agents >= 0.0.19", @@ -73,6 +78,7 @@ default-groups = [ "encryption", "gevent", "langchain", + "nexus", "open-telemetry", "pydantic-converter", "sentry", @@ -98,6 +104,7 @@ packages = [ "hello", "langchain", "message_passing", + "nexus", "open_telemetry", "patching", "polling", @@ -150,3 +157,4 @@ ignore_errors = true [[tool.mypy.overrides]] module = "opentelemetry.*" ignore_errors = true + diff --git a/tests/hello_nexus/hello_nexus_test.py b/tests/hello_nexus/hello_nexus_test.py new file mode 100644 index 00000000..09b46252 --- /dev/null +++ b/tests/hello_nexus/hello_nexus_test.py @@ -0,0 +1,51 @@ +import asyncio +import sys + +import pytest +from temporalio.client import Client +from temporalio.testing import WorkflowEnvironment + +import hello_nexus.caller.app +import hello_nexus.caller.workflows +import hello_nexus.handler.worker +from tests.hello_nexus.helpers import create_nexus_endpoint, delete_nexus_endpoint + + +async def test_nexus_service_basic(client: Client, env: WorkflowEnvironment): + if env.supports_time_skipping: + pytest.skip("Nexus tests don't work under the Java test server") + + if sys.version_info[:2] < (3, 10): + pytest.skip("Sample is written for Python >= 3.10") + + create_response = await create_nexus_endpoint( + name=hello_nexus.caller.workflows.NEXUS_ENDPOINT, + task_queue=hello_nexus.handler.worker.TASK_QUEUE, + client=client, + ) + try: + handler_worker_task = asyncio.create_task( + hello_nexus.handler.worker.main( + client, + ) + ) + await asyncio.sleep(1) + results = await hello_nexus.caller.app.execute_caller_workflow( + client, + ) + hello_nexus.handler.worker.interrupt_event.set() + await handler_worker_task + hello_nexus.handler.worker.interrupt_event.clear() + print("\n\n") + print([r.message for r in results]) + print("\n\n") + assert [r.message for r in results] == [ + "Hello world from sync operation!", + "Hello world from workflow run operation!", + ] + finally: + await delete_nexus_endpoint( + id=create_response.endpoint.id, + version=create_response.endpoint.version, + client=client, + ) diff --git a/tests/hello_nexus/helpers.py b/tests/hello_nexus/helpers.py new file mode 100644 index 00000000..dee8dc18 --- /dev/null +++ b/tests/hello_nexus/helpers.py @@ -0,0 +1,39 @@ +import temporalio.api +import temporalio.api.common +import temporalio.api.common.v1 +import temporalio.api.enums.v1 +import temporalio.api.nexus +import temporalio.api.nexus.v1 +import temporalio.api.operatorservice +import temporalio.api.operatorservice.v1 +from temporalio.client import Client + + +# TODO: copied from sdk-python tests/helpers/nexus +async def create_nexus_endpoint( + name: str, task_queue: str, client: Client +) -> temporalio.api.operatorservice.v1.CreateNexusEndpointResponse: + return await client.operator_service.create_nexus_endpoint( + temporalio.api.operatorservice.v1.CreateNexusEndpointRequest( + spec=temporalio.api.nexus.v1.EndpointSpec( + name=name, + target=temporalio.api.nexus.v1.EndpointTarget( + worker=temporalio.api.nexus.v1.EndpointTarget.Worker( + namespace=client.namespace, + task_queue=task_queue, + ) + ), + ) + ) + ) + + +async def delete_nexus_endpoint( + id: str, version: int, client: Client +) -> temporalio.api.operatorservice.v1.DeleteNexusEndpointResponse: + return await client.operator_service.delete_nexus_endpoint( + temporalio.api.operatorservice.v1.DeleteNexusEndpointRequest( + id=id, + version=version, + ) + ) diff --git a/uv.lock b/uv.lock index c7f17f2b..0096ff3b 100644 --- a/uv.lock +++ b/uv.lock @@ -1189,6 +1189,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/de/f0/63b06b99b730b9954f8709f6f7d9b8d076fa0a973e472efe278089bde42b/langsmith-0.1.147-py3-none-any.whl", hash = "sha256:7166fc23b965ccf839d64945a78e9f1157757add228b086141eb03a60d699a15", size = 311812, upload-time = "2024-11-27T17:32:39.569Z" }, ] +[[package]] +name = "markdown-it-py" +version = "3.0.0" +source = { registry = "https://pypi.org/simple/" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596, upload-time = "2023-06-03T06:41:14.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528, upload-time = "2023-06-03T06:41:11.019Z" }, +] + [[package]] name = "marshmallow" version = "3.26.1" @@ -1221,6 +1233,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/97/fc/80e655c955137393c443842ffcc4feccab5b12fa7cb8de9ced90f90e6998/mcp-1.9.4-py3-none-any.whl", hash = "sha256:7fcf36b62936adb8e63f89346bccca1268eeca9bf6dfb562ee10b1dfbda9dac0", size = 130232, upload-time = "2025-06-12T08:20:28.551Z" }, ] +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple/" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, +] + [[package]] name = "multidict" version = "6.5.0" @@ -1407,6 +1428,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/bf/2f/9e9d0dcaa4c6ffa22b7aa31069a8a264c753ff8027b36af602cce038c92f/nexus_rpc-1.1.0-py3-none-any.whl", hash = "sha256:d1b007af2aba186a27e736f8eaae39c03aed05b488084ff6c3d1785c9ba2ad38", size = 27743, upload-time = "2025-07-07T19:03:57.556Z" }, ] +[[package]] +name = "nodeenv" +version = "1.9.1" +source = { registry = "https://pypi.org/simple/" } +sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, +] + [[package]] name = "numpy" version = "1.26.4" @@ -2081,6 +2111,28 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b6/5f/d6d641b490fd3ec2c4c13b4244d68deea3a1b970a97be64f34fb5504ff72/pydantic_settings-2.9.1-py3-none-any.whl", hash = "sha256:59b4f431b1defb26fe620c71a7d3968a710d719f5f4cdbbdb7926edeb770f6ef", size = 44356, upload-time = "2025-04-18T16:44:46.617Z" }, ] +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple/" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pyright" +version = "1.1.403" +source = { registry = "https://pypi.org/simple/" } +dependencies = [ + { name = "nodeenv" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fe/f6/35f885264ff08c960b23d1542038d8da86971c5d8c955cfab195a4f672d7/pyright-1.1.403.tar.gz", hash = "sha256:3ab69b9f41c67fb5bbb4d7a36243256f0d549ed3608678d381d5f51863921104", size = 3913526, upload-time = "2025-07-09T07:15:52.882Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/b6/b04e5c2f41a5ccad74a1a4759da41adb20b4bc9d59a5e08d29ba60084d07/pyright-1.1.403-py3-none-any.whl", hash = "sha256:c0eeca5aa76cbef3fcc271259bbd785753c7ad7bcac99a9162b4c4c7daed23b3", size = 5684504, upload-time = "2025-07-09T07:15:50.958Z" }, +] + [[package]] name = "pytest" version = "7.4.4" @@ -2111,6 +2163,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ac/4b/7c400506ec484ec999b10133aa8e31af39dfc727042dc6944cd45fd927d0/pytest_asyncio-0.18.3-py3-none-any.whl", hash = "sha256:8fafa6c52161addfd41ee7ab35f11836c5a16ec208f93ee388f752bea3493a84", size = 14597, upload-time = "2022-03-25T09:43:57.106Z" }, ] +[[package]] +name = "pytest-pretty" +version = "1.3.0" +source = { registry = "https://pypi.org/simple/" } +dependencies = [ + { name = "pytest" }, + { name = "rich" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ba/d7/c699e0be5401fe9ccad484562f0af9350b4e48c05acf39fb3dab1932128f/pytest_pretty-1.3.0.tar.gz", hash = "sha256:97e9921be40f003e40ae78db078d4a0c1ea42bf73418097b5077970c2cc43bf3", size = 219297, upload-time = "2025-06-04T12:54:37.322Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/85/2f97a1b65178b0f11c9c77c35417a4cc5b99a80db90dad4734a129844ea5/pytest_pretty-1.3.0-py3-none-any.whl", hash = "sha256:074b9d5783cef9571494543de07e768a4dda92a3e85118d6c7458c67297159b7", size = 5620, upload-time = "2025-06-04T12:54:36.229Z" }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -2316,6 +2381,20 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06", size = 54481, upload-time = "2023-05-01T04:11:28.427Z" }, ] +[[package]] +name = "rich" +version = "14.0.0" +source = { registry = "https://pypi.org/simple/" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/53/830aa4c3066a8ab0ae9a9955976fb770fe9c6102117c8ec4ab3ea62d89e8/rich-14.0.0.tar.gz", hash = "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725", size = 224078, upload-time = "2025-03-30T14:15:14.23Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0d/9b/63f4c7ebc259242c89b3acafdb37b41d1185c07ff0011164674e9076b491/rich-14.0.0-py3-none-any.whl", hash = "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0", size = 243229, upload-time = "2025-03-30T14:15:12.283Z" }, +] + [[package]] name = "s3transfer" version = "0.13.0" @@ -2458,7 +2537,7 @@ wheels = [ [[package]] name = "temporalio" -version = "1.14.0" +version = "1.14.1" source = { registry = "https://test.pypi.org/simple/" } dependencies = [ { name = "nexus-rpc" }, @@ -2467,13 +2546,13 @@ dependencies = [ { name = "types-protobuf" }, { name = "typing-extensions" }, ] -sdist = { url = "https://test-files.pythonhosted.org/packages/6d/e9/66ccf5b2d2f45b5943f8431c5a3694baaba7d92402b6bb1a56044ac23aed/temporalio-1.14.0.tar.gz", hash = "sha256:6dbe3b8da0b8c3b7b0079f1985770fd42d826bf98dea312ea2eb46216bcee38b", size = 1605629, upload-time = "2025-07-08T05:47:39.959Z" } +sdist = { url = "https://test-files.pythonhosted.org/packages/40/23/ef5ed581d26112e21c4a6d4ddc2c4eaa5700c0d70b53b07566553e9b7d90/temporalio-1.14.1.tar.gz", hash = "sha256:b240cf56f64add65beb75bd18aa854ac35bdc2505097af5af1e235d611190a9d", size = 1607639, upload-time = "2025-07-10T20:29:47.454Z" } wheels = [ - { url = "https://test-files.pythonhosted.org/packages/c7/49/2246f321a65028cdfec49a480ee4a77bd1c8a6d0efd5ef7eee29d9e17311/temporalio-1.14.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:5a08acc57b9ff0c1c0c2a78bd519448787c6b5fd5695da6f0f6bc2eecd23d7e1", size = 12505134, upload-time = "2025-07-08T05:47:27.949Z" }, - { url = "https://test-files.pythonhosted.org/packages/09/30/9004e8743d3cc76684edfcbed1b0ed1b96ebff624803a13fff9b61e1dc5c/temporalio-1.14.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:0dcc5a50e8a9302a808e7e191fd71e0f1ada56003a5b2b03347748966a92d120", size = 12089962, upload-time = "2025-07-08T05:47:30.398Z" }, - { url = "https://test-files.pythonhosted.org/packages/ca/a0/957df6473f210079d5032a65685ddcf26d00cfdbdce4ff9ddcc8b004f7ec/temporalio-1.14.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e7851ff63311af159086741be77071a43a8dc22de6cae4269ca9c907282160cd", size = 12451575, upload-time = "2025-07-08T05:47:33.413Z" }, - { url = "https://test-files.pythonhosted.org/packages/b2/14/682ee77ce0cf624b809ff2fc2bc33666b879ca3461cfbb61d4e94a712044/temporalio-1.14.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7663373e9d41f63522305fe5c0a246f47d498f9f653b9c19079638440191f611", size = 12687936, upload-time = "2025-07-08T05:47:35.451Z" }, - { url = "https://test-files.pythonhosted.org/packages/43/ac/ecb434b6edb71ae8089a8d87007b7d34293ab48f42487ffde3c15a2f0d30/temporalio-1.14.0-cp39-abi3-win_amd64.whl", hash = "sha256:93a6a2cf5115449b5c9c26a062008cc3c16113facf2268c68cfa3e032c0a02ab", size = 12756882, upload-time = "2025-07-08T05:47:37.707Z" }, + { url = "https://test-files.pythonhosted.org/packages/bd/66/6dc4f5a647a9901cf19e012c442173574babdc879ccaf4cb166662a23ef0/temporalio-1.14.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:ebde00b59af72e512e5837445e4b5b8aa445431d57a71bbeb57a5ba8a93ac8be", size = 12508009, upload-time = "2025-07-10T20:29:34.51Z" }, + { url = "https://test-files.pythonhosted.org/packages/bb/dc/654ebcc92c658180576127ac6dc047fab43b7730f39df4439645e91577fb/temporalio-1.14.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:3c21cff8fdc60fbcc9acd91e6c119b0b5f9de7671fe806459f00d68bd4ecae78", size = 12091653, upload-time = "2025-07-10T20:29:37.547Z" }, + { url = "https://test-files.pythonhosted.org/packages/8a/58/7fc3a7bde275c059e42d0279c54e8e66642b67be8eda21b31347f4277186/temporalio-1.14.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f984b503ae741213fe71128d6193076f3267691561ff3c55dbe798f92e6ee1b", size = 12451995, upload-time = "2025-07-10T20:29:40.186Z" }, + { url = "https://test-files.pythonhosted.org/packages/98/12/14f6a7a1f4aebb7d846469f5c1cd165cce55b793ded6ce5fc315bd83e28f/temporalio-1.14.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:830cb1a820624a5e64f6c874b5aca6ad9eb841295407dd2011074159a2d28bdb", size = 12688904, upload-time = "2025-07-10T20:29:42.834Z" }, + { url = "https://test-files.pythonhosted.org/packages/b4/ed/c09f1ca41d5ed9f9a777a0ddd5bc225f8300bab8b42bc6751195566706fb/temporalio-1.14.1-cp39-abi3-win_amd64.whl", hash = "sha256:ad4e6a16b42bb34aebec62fb8bbe8f64643d8268ed6d7db337dfe98a76799bb0", size = 12758696, upload-time = "2025-07-10T20:29:45.31Z" }, ] [package.optional-dependencies] @@ -2509,8 +2588,10 @@ dev = [ { name = "frozenlist" }, { name = "isort" }, { name = "mypy" }, + { name = "pyright" }, { name = "pytest" }, { name = "pytest-asyncio" }, + { name = "pytest-pretty" }, { name = "types-pyyaml" }, ] dsl = [ @@ -2534,6 +2615,9 @@ langchain = [ { name = "tqdm" }, { name = "uvicorn", extra = ["standard"] }, ] +nexus = [ + { name = "nexus-rpc" }, +] open-telemetry = [ { name = "opentelemetry-exporter-otlp-proto-grpc" }, { name = "temporalio", extra = ["opentelemetry"] }, @@ -2554,7 +2638,7 @@ trio-async = [ ] [package.metadata] -requires-dist = [{ name = "temporalio", specifier = ">=1.14.0,<2" }] +requires-dist = [{ name = "temporalio", specifier = ">=1.14.1,<2" }] [package.metadata.requires-dev] bedrock = [{ name = "boto3", specifier = ">=1.34.92,<2" }] @@ -2569,8 +2653,10 @@ dev = [ { name = "frozenlist", specifier = ">=1.4.0,<2" }, { name = "isort", specifier = ">=5.10.1,<6" }, { name = "mypy", specifier = ">=1.4.1,<2" }, + { name = "pyright", specifier = ">=1.1.394" }, { name = "pytest", specifier = ">=7.1.2,<8" }, { name = "pytest-asyncio", specifier = ">=0.18.3,<0.19" }, + { name = "pytest-pretty", specifier = ">=1.3.0" }, { name = "types-pyyaml", specifier = ">=6.0.12.20241230,<7" }, ] dsl = [ @@ -2592,8 +2678,9 @@ langchain = [ { name = "tqdm", specifier = ">=4.62.0,<5" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.24.0.post1,<0.25" }, ] +nexus = [{ name = "nexus-rpc", specifier = ">=1.1.0,<2" }] open-telemetry = [ - { name = "opentelemetry-exporter-otlp-proto-grpc", specifier = "==1.18.0" }, + { name = "opentelemetry-exporter-otlp-proto-grpc" }, { name = "temporalio", extras = ["opentelemetry"] }, ] openai-agents = [