Skip to main content

Send JSON-RPC requests

Project description

PyPI Downloads Coverage Status

jsonrpcclient

Version 3 is out. See the changelog, example usage, and read the updated documentation.

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'

Full documentation is at jsonrpcclient.readthedocs.io.

Testing

pip install "jsonrpcclient[unittest]" mypy
pytest
mypy jsonrpcclient

See also: jsonrpcserver

Project details


Release history Release notifications | RSS feed

This version

3.2.0

Download files

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

Source Distribution

jsonrpcclient-3.2.0.tar.gz (14.5 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