jsonrpcclientΒΆ

Send JSON-RPC requests in Python.

$ pip install "jsonrpcclient[requests]"
import jsonrpcclient
response = jsonrpcclient.request("http://localhost:5000", "ping")
>>> response.text
'{"jsonrpc": "2.0", "result": "pong", "id": 1}'
>>> response.data.result
'pong'

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