Skip to main content

A JSON-RPC client library base interface

Project description

https://github.com/emlove/jsonrpc-base/actions/workflows/main.yml/badge.svg https://coveralls.io/repos/emlove/jsonrpc-base/badge.svg

This is a compact and simple JSON-RPC client implementation interface python code. This code is forked from https://github.com/gciotta/jsonrpc-requests

Main Features

  • Python 3.6, 3.7, 3.8 & 3.9 compatible

  • Supports nested namespaces (eg. app.users.getUsers())

  • 100% test coverage

Usage

See jsonrpc-async and jsonrpc-websocket for example implementations.

Tests

Install the Python tox package and run tox, it’ll test this package with various versions of Python.

Changelog

2.2.0 (2023-12-11)

2.1.1 (2022-05-03)

  • Unpin test dependencies

2.1.0 (2021-05-03)

  • Use uuid4 for request IDs

2.0.0 (2021-03-16)

  • BREAKING CHANGE: Allow single mapping as a positional parameter. Previously, when calling with a single dict as a parameter (example: server.foo({'bar': 0})), the mapping was used as the JSON-RPC keyword parameters. This made it impossible to send a mapping as the first and only positional parameter. If you depended on the old behavior, you can recreate it by spreading the mapping as your method’s kwargs. (example: server.foo(**{'bar': 0}))

1.1.0 (2020-08-24)

  • Support for async server request handlers

1.0.3 (2019-11-12)

1.0.2 (2018-08-23)

  • Improved support for JSON-RPC v1 servers. (#2) @tdivis

1.0.1 (2018-07-06)

  • Falsey values are no longer treated as None for message IDs, or request parameters.

Credits

@gciotta for creating the base project jsonrpc-requests.

@mbroadst for providing full support for nested method calls, JSON-RPC RFC compliance and other improvements.

@vaab for providing api and tests improvements, better RFC compliance.

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

jsonrpc-base-2.2.0.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file jsonrpc-base-2.2.0.tar.gz.

File metadata

  • Download URL: jsonrpc-base-2.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for jsonrpc-base-2.2.0.tar.gz
Algorithm Hash digest
SHA256 931a9a37c637b46eec7e1f9ba894655f8241381309e89b948d7d278c29f672ba
MD5 fe3c89e462767d44d5d7ef139b27469b
BLAKE2b-256 b9540b20d7e5e32221d759ad8f4282c03ceb54be6e48b4ff641affd35131f4ce

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