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.4.1.tar.gz
(15.6 kB
view details)
Built Distribution
File details
Details for the file jsonrpc2-objects-1.4.1.tar.gz
.
File metadata
- Download URL: jsonrpc2-objects-1.4.1.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.15.8-76051508-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed85890fd7bf4e111bb97654b8e6d9671d5d464f19d67c4ebcf2e25cfc6bc3f |
|
MD5 | c7fbe121c37d664f16b5ead5f3bdd52b |
|
BLAKE2b-256 | 1208180d35ef8fc1539a657612fcb51f18abed419c7f5045028feb7b418b46bc |
File details
Details for the file jsonrpc2_objects-1.4.1-py3-none-any.whl
.
File metadata
- Download URL: jsonrpc2_objects-1.4.1-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.15.8-76051508-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 488f03c1e051673f31fdf5e05de5e406ab996d3d96a315564abd390ffba67754 |
|
MD5 | ddace0143b9aceac270c110d27aa6987 |
|
BLAKE2b-256 | de36744d576924c4890ee977a9b00a2bf2e3f95174d3ef9a243f58ec0918cf0c |