Skip to main content

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


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 hashes)

Uploaded Source

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