{"id":16543142,"url":"https://github.com/codemation/easyrpc","last_synced_at":"2026-03-03T17:12:22.132Z","repository":{"id":48507907,"uuid":"304013328","full_name":"codemation/easyrpc","owner":"codemation","description":"An easy to use rpc framework for enabling fast inter-process, inter-container, or inter-host communication","archived":false,"fork":false,"pushed_at":"2023-02-01T22:05:21.000Z","size":773,"stargazers_count":65,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-06T21:02:44.383Z","etag":null,"topics":["asyncio","distributed-systems","fastapi","rpc","websockets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-14T12:49:38.000Z","updated_at":"2025-02-03T06:02:09.000Z","dependencies_parsed_at":"2023-02-17T11:45:19.720Z","dependency_job_id":null,"html_url":"https://github.com/codemation/easyrpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemation%2Feasyrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemation%2Feasyrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemation%2Feasyrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemation%2Feasyrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemation","download_url":"https://codeload.github.com/codemation/easyrpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826797,"owners_count":20354221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","distributed-systems","fastapi","rpc","websockets"],"created_at":"2024-10-11T18:59:27.879Z","updated_at":"2026-03-03T17:12:22.126Z","avatar_url":"https://github.com/codemation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](./docs/images/logo.png)\n\nAn easy to use rpc framework for enabling fast inter-process, inter-container, or inter-host communication\n\nEasily share functions between hosts, processes, containers without the complexity of defining non-native python types or proxy modules.\n\n[![Documentation Status](https://readthedocs.org/projects/easyrpc/badge/?version=latest)](https://easyrpc.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/easyrpc.svg)](https://pypi.org/project/easyrpc/)\n\n## Documentation\n[easyrpc.readthedocs.io](https://easyrpc.readthedocs.io)\n\n## Key Features\n- No predefined proxy functions at the remote endpoints\n- Easily group and share functons among hosts / processes using Namespaces / Namespace Groups\n- Proxy functions parameters are validated as if defined locally.\n- Optional: pre-flight encyrption \n- No strict RPC message structure / size limit\n- Flexible parameter types within pickable constraint\n\n## Quick Start\n\n```bash\n$ uv init --python \"\u003e=3.11\"\n\n$ uv add easyrpc\n```\n\n## Basic Usage:\n\n```python\n# server.py\nfrom fastapi import FastAPI\nfrom easyrpc.server import EasyRpcServer\n\nserver = FastAPI()\n\nws_server_a = EasyRpcServer(server, '/ws/server_a', server_secret='abcd1234')\n\n@ws_server_a.origin(namespace='public')\ndef good_func_a(a, b, c):\n    print(f\"good_func_a {a} {b} {c}\")\n    return {\"good_func_a\": [a, b, c]}\n```\n```python\n# client.py\nimport asyncio\nfrom easyrpc.proxy import EasyRpcProxy\n\nasync def main():\n    proxy = await EasyRpcProxy.create(\n        '0.0.0.0', \n        8090, \n        '/ws/server_a', \n        server_secret='abcd1234',\n        'namespace='public'\n    )\n\n    good_func_a = proxy['good_func_a']\n    result = await good_func_a(1, 5, 7)\n    print(result)\n\nasyncio.run(main())\n```\n\n## Recipes\nSee other usage examples in [Recipes](https://github.com/codemation/easyrpc/tree/main/recipes)\n- [basic](https://github.com/codemation/easyrpc/tree/main/recipes/basic)\n- [clusters](https://github.com/codemation/easyrpc/tree/main/recipes/clusters)\n- [FastAPI-Shared-Database](https://github.com/codemation/easyrpc/tree/main/recipes/fastapi/shared_database)\n- [Generators](https://github.com/codemation/easyrpc/tree/main/recipes/generators)\n\n\n## Supported Functions Features\n- async def \u0026 def\n- async generators \u0026 generators\n- *args, **kwargs\n- positional \u0026 default parmeters\n- TODO - type annotations\n\n## Common Use Cases\n- State sharing among forked workers \n- Shared Database connections / cache \n- Shared Queues\n- Worker Pooling - Easy centralization for workers and distribution of work.  \n- Function Chaining\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemation%2Feasyrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemation%2Feasyrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemation%2Feasyrpc/lists"}