This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This is a compact (~100 SLOC) and simple JSON-RPC client implementation written while debugging a picky server.

Main Features

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

Usage

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

A notification:

from jsonrpc_requests import Server
server.foo(bar=1, _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')
try:
    server.foo()
except TransportError as transport_error:
    print(transport_error.args[1]) # this will hold a `requests.exceptions.RequestException` instance

Tests

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

Credits

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

Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
jsonrpc-requests-0.3.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Jun 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting