--- id: json-rpc version: "1.15.0" license: MIT license_treatment: permissive maintenance: aging --- # json-rpc — JSON-RPC transport implementation License: permissive · Maintenance: aging · Downloads: 7.4M/mo ## 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 above — 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 pip install json-rpc uv add json-rpc 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 7.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags json-rpc protocol implementation, rpc method dispatcher, json-rpc 2.0 specification, remote procedure call python, json-rpc 1.0 support, transport agnostic rpc, rpc-protocol, transport-agnostic [View on SkillFed](https://skillfed.io/packages/json-rpc) · [View on PyPI](https://pypi.org/project/json-rpc/)