=======================================================================================================
Main Features
-------------
* Python 2.7 & 3.4 compatible
* Exposes tornado.httpclient options
* Non-Blocking I/O
* Supports nested namespaces (eg. `app.users.getUsers()`)
Install
-------
pip install git+https://github.com/artemmus/jsonrpc_tornado.git
Usage
-----
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,
request_timeout=5.0)
# call some function on the server
result = server.foo(1, 2)
An example of non-blocking calls:
.. code-block:: python
from jsonrpc_tornado import JSONRPCServer, ProtocolError, TransportError
from tornado import gen
@gen.coroutine
def fetch_coroutine(server_url):
server = JSONRPCServer(server_url, request_timeout=5.0)
try:
# call some function on the server
result = yield server.foo(1, 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])
TODO
----
* Tests
Credits
-------
Based on `jsonrpc_requests <http://github.com/gciotta/jsonrpc-requests>` by `Giuseppe Ciotta <gciotta@gmail.com>`_.
Metadata
Release files for jsonrpc_tornado 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsonrpc_tornado-0.1.0.tar.gz | 4.2 kB | Without provenance | Details for jsonrpc_tornado-0.1.0.tar.gz |
Release files / jsonrpc_tornado-0.1.0.tar.gz
| Download URL | jsonrpc_tornado-0.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a48ac7feebb9fde68a6dc2386933c30fffea31d9301b431fbe3da7988cf1f8ee
|
|
BLAKE2b-256 checksum How to use checksums |
613fadf910f60fcd7d7408ce895e6d460959914e4340549616c324a5df8e237b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for jsonrpc_tornado 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.