{"library":"nexus-rpc","title":"Nexus RPC Python SDK","description":"nexus-rpc is a Python SDK for building handlers that implement the Nexus synchronous RPC protocol. Nexus is designed for arbitrary-duration operations, allowing handlers to respond synchronously or return a token for asynchronous completion. As of version 1.4.0, the SDK is in an experimental release stage, and backwards-incompatible changes are expected prior to a stable release.","status":"active","version":"1.4.0","language":"en","source_language":"en","source_url":"https://github.com/nexus-rpc/sdk-python","tags":["rpc","synchronous-rpc","handler","temporal"],"install":[{"cmd":"pip install nexus-rpc","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"symbol":"nexusrpc","correct":"import nexusrpc"},{"symbol":"service","correct":"from nexusrpc import service"},{"symbol":"Operation","correct":"from nexusrpc import Operation"},{"symbol":"handler","correct":"from nexusrpc import handler"}],"quickstart":{"code":"from dataclasses import dataclass\nimport nexusrpc\n\n@dataclass\nclass MyInput:\n    name: str\n\n@dataclass\nclass MyOutput:\n    message: str\n\n@nexusrpc.service\nclass MyNexusService:\n    my_sync_operation: nexusrpc.Operation[MyInput, MyOutput]\n\n@nexusrpc.handler.service_handler(service=MyNexusService)\nclass MyNexusServiceHandler:\n    @nexusrpc.handler.sync_operation\n    async def my_sync_operation(\n        self, ctx: nexusrpc.handler.StartOperationContext, input: MyInput\n    ) -> MyOutput:\n        return MyOutput(message=f\"Hello {input.name}!\")\n\n# In a real application, you would instantiate MyNexusServiceHandler\n# and integrate it with your server/worker to process Nexus requests.\n# For example:\n# handler_instance = MyNexusServiceHandler()","lang":"python","description":"This quickstart demonstrates how to define a Nexus service and implement a synchronous operation handler. It uses dataclasses for input and output types, decorates a class as a Nexus service, and then implements a service handler with a decorated synchronous operation."},"warnings":[{"fix":"Monitor official releases and changelogs for breaking changes. Pin exact versions in your `requirements.txt` to prevent unexpected updates.","message":"The nexus-rpc SDK is currently at an experimental release stage. Backwards-incompatible changes are anticipated until a stable release is announced.","severity":"breaking","affected_versions":"All versions up to 1.4.0"},{"fix":"Verify the project's origin and documentation (github.com/nexus-rpc/sdk-python) to confirm you are using the intended library.","message":"The PyPI package name 'nexus-rpc' was previously used by an unrelated project. Ensure you are using the correct SDK for the Nexus synchronous RPC protocol from the `nexus-rpc` GitHub organization.","severity":"gotcha","affected_versions":"All versions"},{"fix":"You will need to implement or integrate a Nexus server and client separately to utilize the defined services and handlers. If integrating with Temporal, refer to their Nexus documentation for server-side setup.","message":"The SDK for the Nexus RPC protocol only provides components for implementing handlers. It does not include reference implementations for Nexus servers or clients.","severity":"gotcha","affected_versions":"All versions up to 1.4.0"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}