skillfed

json-rpc

JSON-RPC transport implementation

json-rpc v1.15.0 7.4M downloads/30d#1,743 on PyPI490
Permissive license MIT AGING released

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-rpc

uv

uv add json-rpc

poetry

poetry add json-rpc

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

json-rpc protocol implementationrpc method dispatcherjson-rpc 2.0 specificationremote procedure call pythonjson-rpc 1.0 supporttransport agnostic rpc
rpc-protocoltransport-agnostic

More Python Modules packages