jsonrpcserverΒΆ

Process JSON-RPC requests in Python.

from jsonrpcserver import methods

@methods.add
def ping():
    return 'pong'

if __name__ == '__main__':
    methods.serve_forever()

Start the server:

$ pip install jsonrpcserver
$ python server.py
 * Listening on port 5000

This example uses the built-in server, but any application can process requests with the dispatch() method. See examples in various frameworks, or read the guide to usage and configuration.

Contribute on Github.

See also: jsonrpcclient