Skip to main content

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 servers in Python.

Requirements

  • Python 3.14+
  • Pydantic for data models.

Installation

uv add openrpc

Or

pip install openrpc

Example

This is a minimal OpenRPC server hosted over HTTP using aiohttp.

from aiohttp import web
from openrpc import RPCApp

rpc = RPCApp()


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


async def api(request: web.Request) -> web.Response:
    return web.Response(body=await rpc.process(await request.text()))


if __name__ == "__main__":
    app = web.Application()
    _ = app.router.add_post("/api", api)
    web.run_app(app)

Example In

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

Example Result Out

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

Support the Developer

Buy Me a Coffee

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openrpc-11.0.1.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openrpc-11.0.1-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file openrpc-11.0.1.tar.gz.

File metadata

  • Download URL: openrpc-11.0.1.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openrpc-11.0.1.tar.gz
Algorithm Hash digest
SHA256 de2d879670ccd9991c1058cd0392efe4ddf68dac1100e8e01e4dddb26032f552
MD5 f4fe9f9e77c6823865f57e1a48c745c0
BLAKE2b-256 66f0eacc71f87633ca3cc6a6229aa7ded083c3441a98074c7205b88e484aa87e

See more details on using hashes here.

File details

Details for the file openrpc-11.0.1-py3-none-any.whl.

File metadata

  • Download URL: openrpc-11.0.1-py3-none-any.whl
  • Upload date:
  • Size: 35.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for openrpc-11.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96dd6cfa74a738e52bf9aaa25085cea8561f2ac85539d82b415a40b6a770f5be
MD5 2dae35ccf7621b31b4d51d2e3a64e9e1
BLAKE2b-256 10666afb943ba63635a2f19648939a798bae9736aa45b1822a1567d9bb9cdd31

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

11.0.1 This release

2 files

11.0.0

2 files

10.5.0

2 files

10.4.0

2 files

10.3.9

2 files

10.3.6

2 files

10.3.5

2 files

10.3.2

2 files

10.3.1

2 files

10.2.5

2 files

10.2.2

2 files

10.1.3

2 files

10.1.2

2 files

10.0.2

2 files

10.0.1

2 files

10.0.0

2 files

9.0.1

2 files

9.0.0

2 files

8.4.1

2 files

8.3.0

2 files

8.2.94

2 files

8.2.9

2 files

8.1.0

2 files

8.0.1

2 files

8.0.0

2 files

7.5.0

2 files

7.4.1

2 files

7.3.8

2 files

7.3.7

2 files

7.3.2

2 files

7.3.1

2 files

7.2.1

2 files

7.2.0

2 files

7.0.2

2 files

7.0.1

2 files

7.0.0

2 files

6.3.21

2 files

6.3.17

2 files

6.3.9

2 files

6.1.5

2 files

6.1.4

2 files

6.1.2

2 files

6.1.0

2 files

6.0.5

2 files

6.0.4

2 files

6.0.2

2 files

5.1.0

2 files

5.0.21

2 files

5.0.3

2 files

4.1.0

2 files

4.0.1

2 files

3.2.10

2 files

3.0.20

2 files

2.0.2

1 file

2.0.0

1 file

1.2.10

1 file

1.2.2

1 file

1.0.5

1 file

1.0.4

1 file

1.0.1

1 file

0.7.3

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page