README.md
July 29, 2025 ยท View on GitHub
Create JSON-RPC requests and parse responses in Python
Documentation | Developer Wiki
https://github.com/user-attachments/assets/080861a5-0819-43ec-a9e2-f8ea7eb694f5
๐ Installation
pip install jsonrpcclient
โ๏ธ Usage
Generate a request:
from jsonrpcclient import request, parse
req = request("ping")
# => {'jsonrpc': '2.0', 'method': 'ping', 'id': 1}
Parse a response:
parsed = parse({"jsonrpc": "2.0", "result": "pong", "id": 1})
# => Ok(result='pong', id=1)
Tip
For strings, use request_json and parse_json.
๐ Documentation
๐ Full documentation is at explodinglabs.com/jsonrpcclient/.
๐ See the Wiki for community-editable usage examples in various frameworks, libraries, and transport protocols.
๐ See Also
- jsonrpcserver โ Process incoming JSON-RPC requests in Python