README.md
July 29, 2025 ยท View on GitHub
Process incoming JSON-RPC requests in Python
Documentation | Developer Wiki
https://github.com/user-attachments/assets/94fb4f04-a5f1-41ca-84dd-7e18b87990e0
๐ Installation
pip install jsonrpcserver
โ๏ธ Usage
from jsonrpcserver import dispatch, method, Success
@method
def ping():
return Success("pong")
response = dispatch('{"jsonrpc": "2.0", "method": "ping", "id": 1}')
# => '{"jsonrpc": "2.0", "result": "pong", "id": 1}'
๐ Documentation
๐ Full documentation is at explodinglabs.com/jsonrpcserver/.
๐ See the Wiki for community-editable usage examples in various frameworks, libraries, and transport protocols.
โก๏ธ See Also
- jsonrpcclient โ Create JSON-RPC requests and parse responses in Python