Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

jsonrpc implementation for tornado

Project Description
JSON RPC implementation for tornado
===================================

This implementation follow JSONRPC 2.0 specification.

REQUIREMENTS
------------

python >= 3.5 (I use async/await in the package)

INSTALLATION
------------

pip install tornado_jsonrpc

USAGE
-----

It is so simple:

1. Just create `views.py`

def some_view(request: RequestHandler, *args, **kwargs): #
"""
args: positional params, which You pass when call jsonrpc method
kwargs: named params, which You pass when call jsonrpc method
"""

return {'foo': 'bar'} # any JSON serializable object (dict or list for example)

2. And then create `tornado_app.py`, where You define tornado Application:

from tornado_jsonrpc import JSONRPCHandler
from tornado.ioloop import IOLoop
from tornado.web import Application

from your_package import views

Application(
[
('/api', views.JSONRPCHandler, dict(views=views)),
],
).listen(8888)

IOLoop.current().start()

CONTRIBUTE
----------

If You have found an error or want to offer some changes - create a pull request and I will review it as soon as possible!
Release History

Release History

This version
History Node

1.0.1

History Node

1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tornado_jsonrpc-1.0.1-py2.py3-none-any.whl (8.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Oct 22, 2016
tornado_jsonrpc-1.0.1.tar.gz (2.9 kB) Copy SHA256 Checksum SHA256 Source Oct 22, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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