Send JSON-RPC requests
Project description
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]"
from jsonrpcclient.clients.http_client import HTTPClient
client = HTTPClient("http://localhost:5000")
response = client.request("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
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.1.0.tar.gz
(14.0 kB
view details)
File details
Details for the file jsonrpcclient-3.1.0.tar.gz
.
File metadata
- Download URL: jsonrpcclient-3.1.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df34d98ec6d5232c843f8ba71a2bfd82f952644a6bc183cf387ac3b1a9c47d86 |
|
MD5 | 44623f192950e7a361dad9a6829556ec |
|
BLAKE2b-256 | bc273873918db563c5376fe868e1300424426e83fa1dc6707711a9ae0d43a7ad |