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
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 client:
from jsonrpcobjects.errors import MethodNotFound, JSONRPCError
try:
client.example_method(params)
except MethodNotFound:
print('Handle method not found')
except JSONRPCError:
print('Handle any JSON RPC error.')
JSON Types
Type hints are provided for the following JSON types.
- JSONPrimitive
- JSONArray
- JSONObject
- JSONStructured
- JSON
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
jsonrpc2-objects-1.3.0.tar.gz
(15.0 kB
view details)
File details
Details for the file jsonrpc2-objects-1.3.0.tar.gz
.
File metadata
- Download URL: jsonrpc2-objects-1.3.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f208670d6c541b9552409796fe900f2b44fe15db669d056060edc0689621ac11 |
|
MD5 | 95ead9b31125cd01e6766ecdc3d4d359 |
|
BLAKE2b-256 | 57c0e8d265b83eb1fba969eb4ee1686ea5396f5e3da8cd5749e47e5e5468880a |