json-rpc
JSON-RPC transport implementation
What it is and what it does
json-rpc is a pure-Python implementation of JSON-RPC 2.0 and 1.0 protocol specifications. It provides a dispatcher to register callable methods and a response manager to parse incoming JSON-RPC requests and generate compliant responses. The package handles protocol details—request validation, error formatting, batch handling—but deliberately excludes transport; you pair it with external libraries to build a working client or server.
The library supports Python 2.6+, 3.3+, and PyPy, with optional integration for Django and Flask. It has no runtime dependencies, making it lightweight to embed. The protocol-only design means you retain full control over how requests and responses travel—ideal when you need JSON-RPC semantics but a non-standard transport layer.
Use it for:
- Build a JSON-RPC 2.0 server by pairing the dispatcher with an HTTP handler or framework.
- Implement a JSON-RPC client that sends requests and parses responses via your chosen transport.
- Add RPC method registration and validation to an existing application without imposing transport choices.
- Handle batch JSON-RPC requests and generate spec-compliant error responses.
- Integrate JSON-RPC into a microservice or inter-process communication layer on a custom transport.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements JSON-RPC 2.0 and 1.0 protocol specification for parsing requests and dispatching to registered methods, with no transport layer included.
Yes, if you need JSON-RPC protocol handling and will supply your own transport. The zero-dependency design and broad Python version support make it solid for protocol-only use. However, aging maintenance (last release 2023-06-11) means you should verify compatibility with your target Python versions and test thoroughly before adopting in new projects.
Install
json-rpc on PyPI
pip
pip install json-rpcuv
uv add json-rpcpoetry
poetry add json-rpcInstalling json-rpc
Before you install
Low friction: pure Python with no runtime dependencies and distributed as a wheel. Maintenance is aging—last release 2023-06-11, last commit 2025-03-17—but repository remains active and unarchived.
License in practice
MIT license is permissive; you can use, modify, and distribute freely in commercial and private projects with minimal restrictions.
Quickstart
pip install json-rpc
from jsonrpc import JSONRPCResponseManager, dispatcher
@dispatcher.add_method
def add(a, b):
return a + b
response = JSONRPCResponseManager.handle(
'{"jsonrpc": "2.0", "method": "add", "params": [2, 3], "id": 1}',
dispatcher
)
You must provide your own transport layer (HTTP server, socket, message queue); this package handles only protocol parsing and method dispatch.
Verify before relying
- Whether aging maintenance (1160 days since last release) affects compatibility with Python versions beyond 3.8.
- Current test coverage status and whether 200+ tests pass on modern Python versions.
- Whether optional Django and Flask support remains functional with current framework versions.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 1,160 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,417,404/month — #1,743 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: json_rpc-1.15.0-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ajsonrpcImplements the JSON-RPC 2.0 protocol with an…
permissive · top 5,000 on PyPI
python-lsp-jsonrpcImplements a JSON RPC 2.0 server for Python…
permissive · top 5,000 on PyPI
jsonrpcclientGenerates JSON-RPC request objects and parses…
unclear · top 15,000 on PyPI
python-bitcoinrpcProvides a JSON-RPC client library for…
copyleft · top 15,000 on PyPI
transmission-rpcPython wrapper around the Transmission…
permissive · top 15,000 on PyPI
OdooRPCOdooRPC is a Python client library that…
copyleft · top 15,000 on PyPI
python-jsonrpc-serverImplements a JSON RPC 2.0 server that handles…
unclear · top 15,000 on PyPI
mcp-typesProvides the wire types and protocol message…
permissive · top 5,000 on PyPI
paypalhttpPayPalHttp is a generic HTTP client library…
permissive · top 5,000 on PyPI
a2a-sdkA Python SDK for building agentic applications…
permissive · top 5,000 on PyPI