Skip to content

explodinglabs/jsonrpcserver

Repository files navigation

PyPI Code Quality Coverage Status Downloads License

Jsonrpcserver Logo

Process incoming JSON-RPC requests in Python

Documentation | Developer Wiki

jsonrpcserver.mp4

πŸš€ 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