https://github.com/explodinglabs/jsonrpcclient
Generate JSON-RPC requests and parse responses in Python
https://github.com/explodinglabs/jsonrpcclient
api client json-rpc python rpc
Last synced: 2 days ago
JSON representation
Generate JSON-RPC requests and parse responses in Python
- Host: GitHub
- URL: https://github.com/explodinglabs/jsonrpcclient
- Owner: explodinglabs
- License: mit
- Created: 2015-11-01T23:54:50.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T12:48:31.000Z (29 days ago)
- Last Synced: 2025-05-13T03:02:38.195Z (5 days ago)
- Topics: api, client, json-rpc, python, rpc
- Language: Python
- Homepage: https://www.jsonrpcclient.com
- Size: 861 KB
- Stars: 121
- Watchers: 4
- Forks: 45
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README




Create JSON-RPC requests and parse responses in Python.
```sh
pip install jsonrpcclient
```Generate a request:
```python
from jsonrpcclient import request, parse
req = request("ping")
# => {'jsonrpc': '2.0', 'method': 'ping', 'id': 1}
```Parse a response:
```python
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](https://www.youtube.com/watch?v=PxQagaZ0PsY)
Full documentation is at [jsonrpcclient.com](https://www.jsonrpcclient.com/).
See also: [jsonrpcserver](https://github.com/explodinglabs/jsonrpcserver)