Skip to main content

A JSON-RPC client library, backed by requests

Project description

This is a compact and simple JSON-RPC client implementation written while debugging a picky server.

Main Features

  • Python 2.7, 3.4, 3.5, 3.6 compatible
  • Exposes requests options
  • Supports nested namespaces (eg. app.users.getUsers())
  • 100% test coverage


from jsonrpc_requests import Server
server = Server('http://localhost:8080'), 2), baz=2){'foo': 'bar'}), qux=2)

A notification:

from jsonrpc_requests import Server, _notification=True)

Pass through arguments to requests (see also requests documentation)

from jsonrpc_requests import Server
server = Server('http://localhost:8080', auth=('user', 'pass'), headers={'x-test2': 'true'})

Pass through requests exceptions

from jsonrpc_requests import Server, TransportError
server = Server('http://unknown-host')
except TransportError as transport_error:
    print(transport_error.cause) # this will hold a `requests.exceptions.RequestException` instance


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


@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.

Files for jsonrpc-requests, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size (8.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page