Skip to main content

jsonrpc implementation for tornado

Project description

JSON RPC implementation for tornado

This implementation follow JSONRPC 2.0 specification.


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


pip install tornado_jsonrpc


It is so simple:

1. Just create ``

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 ``, 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

('/api', views.JSONRPCHandler, dict(views=views)),


3. You can also use CORSIgnoreJSONRPCHandler to receive requests from all sources
or WithCredentialsJSONRPCHandler to also receive cookies with request.


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

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 tornado-jsonrpc, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size tornado_jsonrpc-1.0.4-py2.py3-none-any.whl (9.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size tornado_jsonrpc-1.0.4.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page