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 JSONRPCError, MethodNotFound
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.7.tar.gz
(15.6 kB
view details)
File details
Details for the file jsonrpc2-objects-1.3.7.tar.gz
.
File metadata
- Download URL: jsonrpc2-objects-1.3.7.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dfdaab7e0f033945bf900d02c3611281f5997d34a8065c4dcc34da9328d817c |
|
MD5 | f9ef3d8c083c2293941a45e6f122f881 |
|
BLAKE2b-256 | 96e56d3f5d6b58b73fe1cd6abcb83c8ae8c45f8c717a6bca39e3a6ff093b9cd8 |