jsonrpcclientΒΆ

Send JSON-RPC requests in Python.

$ pip install "jsonrpcclient[requests]"
>>> from jsonrpcclient import request
>>> response = request("http://fruits.com", "get", color="yellow")
>>> response.text
'{"jsonrpc": "2.0", "result": ["banana", "lemon", "mango"], "id": 1}'
>>> response.data.result
['banana', 'lemon', 'mango']

This example uses the requests library for sending, but more options are available. See examples in various frameworks, or read the guide to usage and configuration.

Contribute on Github.

See also: jsonrpcserver