Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Asynchronous JSON-RPC client for Tornado

Project description

jsonrpc_tornado: a compact asynchronous JSON-RPC client library for `Tornado framework <>`_

Main Features

* Python 2.7 & 3.4 compatible
* Exposes tornado.httpclient options
* Non-Blocking I/O
* Supports nested namespaces (eg. `app.users.getUsers()`)

pip install git+

A synchronous example:

.. code-block:: python

from jsonrpc_tornado import JSONRPCServer
from tornado.httpclient import HTTPClient

def fetch(server_url):
server = JSONRPCServer(server_url, http_client=HTTPClient,

# call some function on the server
result =, 2)

An example of non-blocking calls:

.. code-block:: python

from jsonrpc_tornado import JSONRPCServer, ProtocolError, TransportError
from tornado import gen

def fetch_coroutine(server_url):
server = JSONRPCServer(server_url, request_timeout=5.0)

# call some function on the server
result = yield, 2)
except ProtocolError as err:
logging.error('Some RPC error %s, %s', err.code, err)
except TransportError as err:
# err.args[1] refers to appropriate HTTPError
logging.error('Transport error %s', err.args[1])


* Tests


Based on `jsonrpc_requests <>` by `Giuseppe Ciotta <>`_.

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
jsonrpc_tornado-0.1.0.tar.gz (4.2 kB) Copy SHA256 hash SHA256 Source None May 23, 2015

Supported by

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