Send JSON-RPC requests
Project description
Generate JSON-RPC requests and parse responses in Python.
pip install jsonrpcclient
Generate a request:
from jsonrpcclient import request, parse
req = request("ping")
# => {'jsonrpc': '2.0', 'method': 'ping', 'id': 1}
Parse a response:
parsed = parse({"jsonrpc": "2.0", "result": "pong", "id": 1})
# => Ok(result='pong', id=1)
For strings, use request_json
and parse_json
.
Watch a video on how to use it
Full documentation is at jsonrpcclient.com.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file jsonrpcclient-4.0.3-py3-none-any.whl
.
File metadata
- Download URL: jsonrpcclient-4.0.3-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cbb9e27e1be29821becf135ea183144a836215422727e1ffe5056a49a670f0d |
|
MD5 | 62f5ffaf4d52886638f9b77e81281d1b |
|
BLAKE2b-256 | 004bba54814656b155f14ae73092ae194dd04eaf7e8e9a3da4f2ee7ffc9fe98f |