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.
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.2.1.tar.gz
(15.0 kB
view details)
File details
Details for the file jsonrpc2-objects-1.2.1.tar.gz
.
File metadata
- Download URL: jsonrpc2-objects-1.2.1.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 | 17026d9d615d9c94e0184ea524d93ee7b1398f510fa264702d64ee19135eb9dc |
|
MD5 | a4ec787e37c070dc0ac86f82c3bfa1d7 |
|
BLAKE2b-256 | 1892f5972fba0e2290fba34fcbc0de591632eaddc91082e8159ca0decf9842db |