Skip to main content

JSON-RPC server library.

Project description

Handle JSON-RPC requests.

Write functions to carry out requests:

>>> api.register_method(lambda x, y: x + y, 'add')

Then dispatch requests to them:

>>> api.dispatch({'jsonrpc': '2.0', 'method': 'add', 'params': [2, 3], 'id': 1})
({'jsonrpc': '2.0', 'result': 5, 'id': 1}, 200)

The returned values, a JSON-RPC response and an HTTP status code, can be used to respond to a client.

Full documentation is available at https://jsonrpcserver.readthedocs.org/.

Release History

2.1.0 (2015-09-06)

  • Debug mode can now be enabled by setting a flag on the dispatcher. This allows extra (potentially sensitive) information to be included in the response message to the client. The previous method, passing ``more_info=True`` to the dispatch method, has been removed.

2.0.2 (2015-09-04)

  • Faster request validation. (#23)

2.0.1 (2015-05-09)

  • Fixed logging, now allows you to add handlers to getLogger(‘jsonrpcserver’). See docs for info.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsonrpcserver-2.1.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page