Skip to content

The Application class

The Application class subclasses Tornado's Application class and adds additional options for customizing the OpenAPI and Redoc routes. On initialization, the Application class wil review the handlers and generate OpenAPI spec.

If you are using TornOpen on an existing Tornado application, you can simply replace the Tornado's Application class with TornOpen's Application class. TornOpen's Application is able to work with Tornado's RequestHandler.

__init__(self, rules, *, openapi_yaml_route='/openapi.yaml', openapi_json_route='/openapi.json', redoc_route='/redoc', **settings) special

Parameters:

Name Type Description Default
rules

list of routes and handlers

required
openapi_yaml_route str

Route for openapi.yaml

'/openapi.yaml'
openapi_json_route str

Route for openapi.json

'/openapi.json'
redoc_route str

Route for redoc

'/redoc'
**settings

Settings for Tornado's Application

{}