A collection of objects for use in JSON-RPC 2.0 implementations.
Project description
JSON-RPC 2.0 Objects
A collection of objects for use in JSON-RPC 2.0 implementations.
Installation
pip install jsonrpc2-objects
poetry add jsonrpc2-objects
Objects
Available in objects
are the following:
Object | Description |
---|---|
RequestObjectParams | Request with params |
RequestObject | Request without params |
NotificationObjectParams | Notification with params |
NotificationObject | Notification without params |
ErrorResponseObject | Response with result |
ResultResponseObject | Response with error |
Errors
Python exceptions are available for each JSON-RPC 2.0 error. Each error
extends JSONRPCError
.
Example use with a client implementing these errors:
from jsonrpcobjects.errors import JSONRPCError, MethodNotFound
try:
client.example_method(params)
except MethodNotFound:
print("Handle method not found")
except JSONRPCError:
print("Handle any JSON RPC error.")
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
Built Distribution
Close
Hashes for jsonrpc2_objects-2.0.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3caf27b6684ee774401398c7fed829e8e9c4e4c54bc2a1401e3f45934c269440 |
|
MD5 | 7614e42af2c4513ddd0446542d6857a4 |
|
BLAKE2b-256 | 143841c31141f9f7f727fde12ace00e2414fbc268529f780afc96fbc569d3eda |