Send JSON-RPC requests
Project description
jsonrpcclient
Version 3 is out. See the changelog and read the docs.
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.ok
True
>>> response.data.result
'pong'
Full documentation is at jsonrpcclient.readthedocs.io.
Testing
pip install "jsonrpcclient[unittest]"
pytest
pip install mypy
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.0.1.tar.gz
(13.1 kB
view details)
File details
Details for the file jsonrpcclient-3.0.1.tar.gz
.
File metadata
- Download URL: jsonrpcclient-3.0.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c5d15a15e2dbdd2545f4a54da36bdcac8bb9a327b2da03d8e2649b4c50678f5 |
|
MD5 | 291d35199a90eb8e58af855737de38e4 |
|
BLAKE2b-256 | 4ebdeda4ab25ae8dd7d151afbea1e7667d6a81953ede1550b8b5f8e9e8f3e1bf |