openrpc


Nameopenrpc JSON
Version 10.5.0 PyPI version JSON
download
home_pagehttps://python-openrpc.burkard.cloud
SummaryTransport agnostic framework for developing OpenRPC servers.
upload_time2025-08-19 23:32:08
maintainerNone
docs_urlNone
authorMatthew Burkard
requires_python<4.0,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python OpenRPC

![](https://img.shields.io/badge/License-MIT-blue.svg)
![](https://img.shields.io/badge/code%20style-black-000000.svg)
![](https://img.shields.io/pypi/v/openrpc.svg)
![](https://img.shields.io/badge/coverage-100%25-success)

**Documentation**: https://python-openrpc.burkard.cloud

**Source Code**: https://gitlab.com/mburkard/openrpc

Python OpenRPC is a transport agnostic framework for quickly and easily
developing [OpenRPC](https://open-rpc.org/) servers in Python.

## Requirements

- Python 3.9+
- [Pydantic](https://docs.pydantic.dev/latest/) for data models.

## Installation

OpenRPC is on PyPI and can be installed with:

```shell
pip install openrpc
```

Or with [Poetry](https://python-poetry.org/)

```shell
poetry add openrpc
```

## Example

This is a minimal OpenRPC server hosted over HTTP and WebSockets
using [Tabella](https://gitlab.com/mburkard/tabella)
and [uvicorn](https://www.uvicorn.org/).

```python
from openrpc import RPCServer
import tabella

rpc = RPCServer(title="DemoServer", version="1.0.0")


@rpc.method()
async def add(a: int, b: int) -> int:
    return a + b


app = tabella.get_app(rpc)

if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8080)
```

Example In

```json
{
  "id": 1,
  "method": "add",
  "params": {
    "a": 1,
    "b": 3
  },
  "jsonrpc": "2.0"
}
```

Example Result Out

```json
{
  "id": 1,
  "result": 4,
  "jsonrpc": "2.0"
}
```

## Template App

A [template app](https://gitlab.com/mburkard/openrpc-app-template) is available as an
example or to clone to bootstrap your RPC server.

## Support the Developer

<a href="https://www.buymeacoffee.com/mburkard" target="_blank">
  <img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me a Coffee"
       width="217"
       height="60"/>
</a>

            

Raw data

            {
    "_id": null,
    "home_page": "https://python-openrpc.burkard.cloud",
    "name": "openrpc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Matthew Burkard",
    "author_email": "matthewjburkard@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fd/64/a9236ea0aa9a5b130d9468e6d5a7332bb36d79b272989e1a2364b5b94675/openrpc-10.5.0.tar.gz",
    "platform": null,
    "description": "# Python OpenRPC\n\n![](https://img.shields.io/badge/License-MIT-blue.svg)\n![](https://img.shields.io/badge/code%20style-black-000000.svg)\n![](https://img.shields.io/pypi/v/openrpc.svg)\n![](https://img.shields.io/badge/coverage-100%25-success)\n\n**Documentation**: https://python-openrpc.burkard.cloud\n\n**Source Code**: https://gitlab.com/mburkard/openrpc\n\nPython OpenRPC is a transport agnostic framework for quickly and easily\ndeveloping [OpenRPC](https://open-rpc.org/) servers in Python.\n\n## Requirements\n\n- Python 3.9+\n- [Pydantic](https://docs.pydantic.dev/latest/) for data models.\n\n## Installation\n\nOpenRPC is on PyPI and can be installed with:\n\n```shell\npip install openrpc\n```\n\nOr with [Poetry](https://python-poetry.org/)\n\n```shell\npoetry add openrpc\n```\n\n## Example\n\nThis is a minimal OpenRPC server hosted over HTTP and WebSockets\nusing [Tabella](https://gitlab.com/mburkard/tabella)\nand [uvicorn](https://www.uvicorn.org/).\n\n```python\nfrom openrpc import RPCServer\nimport tabella\n\nrpc = RPCServer(title=\"DemoServer\", version=\"1.0.0\")\n\n\n@rpc.method()\nasync def add(a: int, b: int) -> int:\n    return a + b\n\n\napp = tabella.get_app(rpc)\n\nif __name__ == \"__main__\":\n    uvicorn.run(app, host=\"0.0.0.0\", port=8080)\n```\n\nExample In\n\n```json\n{\n  \"id\": 1,\n  \"method\": \"add\",\n  \"params\": {\n    \"a\": 1,\n    \"b\": 3\n  },\n  \"jsonrpc\": \"2.0\"\n}\n```\n\nExample Result Out\n\n```json\n{\n  \"id\": 1,\n  \"result\": 4,\n  \"jsonrpc\": \"2.0\"\n}\n```\n\n## Template App\n\nA [template app](https://gitlab.com/mburkard/openrpc-app-template) is available as an\nexample or to clone to bootstrap your RPC server.\n\n## Support the Developer\n\n<a href=\"https://www.buymeacoffee.com/mburkard\" target=\"_blank\">\n  <img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-blue.png\" alt=\"Buy Me a Coffee\"\n       width=\"217\"\n       height=\"60\"/>\n</a>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Transport agnostic framework for developing OpenRPC servers.",
    "version": "10.5.0",
    "project_urls": {
        "Homepage": "https://python-openrpc.burkard.cloud",
        "Repository": "https://gitlab.com/mburkard/openrpc"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "813c0e4415c107cf319587c242039fb1dd917bae32bfc3de380471b8c530852d",
                "md5": "95a052638ab334e5d6df026bf6c19ea4",
                "sha256": "445190f6336712266315803cc0dd213815fb8547a452bbb4822ccb5cb833b42f"
            },
            "downloads": -1,
            "filename": "openrpc-10.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "95a052638ab334e5d6df026bf6c19ea4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 21939,
            "upload_time": "2025-08-19T23:32:07",
            "upload_time_iso_8601": "2025-08-19T23:32:07.070874Z",
            "url": "https://files.pythonhosted.org/packages/81/3c/0e4415c107cf319587c242039fb1dd917bae32bfc3de380471b8c530852d/openrpc-10.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd64a9236ea0aa9a5b130d9468e6d5a7332bb36d79b272989e1a2364b5b94675",
                "md5": "229363f1223c0b6addd5f17ed10b9613",
                "sha256": "fc94912c33346b0c6ba17adf05088ccd5a3db2f12a9bf27c615505cc1ef50319"
            },
            "downloads": -1,
            "filename": "openrpc-10.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "229363f1223c0b6addd5f17ed10b9613",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 17996,
            "upload_time": "2025-08-19T23:32:08",
            "upload_time_iso_8601": "2025-08-19T23:32:08.222733Z",
            "url": "https://files.pythonhosted.org/packages/fd/64/a9236ea0aa9a5b130d9468e6d5a7332bb36d79b272989e1a2364b5b94675/openrpc-10.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-19 23:32:08",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "mburkard",
    "gitlab_project": "openrpc",
    "lcname": "openrpc"
}
        
Elapsed time: 3.95289s