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: about 2 months 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 (about 10 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T12:48:31.000Z (9 months ago)
- Last Synced: 2025-05-13T03:02:38.195Z (9 months 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
Documentation |
Developer Wiki
https://github.com/user-attachments/assets/080861a5-0819-43ec-a9e2-f8ea7eb694f5
## 🚀 Installation
```sh
pip install jsonrpcclient
```
## ⚒️ Usage
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)
```
> [!TIP]
> For strings, use `request_json` and `parse_json`.
## 📚 Documentation
👉 Full documentation is at [explodinglabs.com/jsonrpcclient/](https://explodinglabs.com/jsonrpcclient/).
👉 See the [Wiki](https://github.com/explodinglabs/jsonrpcclient/wiki) for community-editable usage examples in various frameworks, libraries, and transport protocols.
## 📖 See Also
- [jsonrpcserver](https://github.com/explodinglabs/jsonrpcserver) – Process incoming JSON-RPC requests in Python