Skip to main content

A collection of objects for use in JSON-RPC 2.0 implementations.

Project description

JSON-RPC 2.0 Objects

Code style: black License: MIT

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


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-2.0.14.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

jsonrpc2_objects-2.0.14-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file jsonrpc2_objects-2.0.14.tar.gz.

File metadata

  • Download URL: jsonrpc2_objects-2.0.14.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/5.4.109+

File hashes

Hashes for jsonrpc2_objects-2.0.14.tar.gz
Algorithm Hash digest
SHA256 bfb4904945c6ed6ea0bac19289e0492c94c97a4dca5f6e57859af0d5d1ff3d3b
MD5 fe4d635c3b65c7560d34b3b22ef4616e
BLAKE2b-256 cc89cf34fd84b5c7eacbcc21c254a2f44f0e5718b2cb582ec5442419b605b159

See more details on using hashes here.

File details

Details for the file jsonrpc2_objects-2.0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for jsonrpc2_objects-2.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 3caf27b6684ee774401398c7fed829e8e9c4e4c54bc2a1401e3f45934c269440
MD5 7614e42af2c4513ddd0446542d6857a4
BLAKE2b-256 143841c31141f9f7f727fde12ace00e2414fbc268529f780afc96fbc569d3eda

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page