The py-jsonapi extension for tornado. Binding the API to a tornado application is as simple as:

import tornado
import tornado.web
import jsonapi
import jsonapi.tornado

app = tornado.web.Application()
api = jsonapi.tornado.TornadoAPI("/api", db=..., tornado_app=app)

# If the tornado application is not available, when you create the API,
# you can bind it later:

The API instance is added to the tornado application’s settings dictionary:

assert app.settings["jsonapi"] is api


class jsonapi.tornado.TornadoAPI(uri, db, settings=None, tornado_app=None)[source]

Bases: jsonapi.asyncio.api.API

Integrates py-jsonapi into a tornado application.


Proxy for the debug setting of the parent tornado application. If you want to enable the debug mode, you must do it on the tornado application.


Returns the tornado application, which owns this API.


Registers the API handler on the tornado application.

Parameters:app (tornado.web.Application) –