Skip to main content

Swagger UI for Tornado

Project description

# tornado-swagger-ui

Simple Tornado Handler for adding [Swagger UI]( to your tornado application.

Included Swagger UI version: 3.22.1.

## Installation

`pip install git+`

## Usage

Example application:

import tornado.ioloop
import tornado.web
from tornado_swagger_ui import get_tornado_handler

SWAGGER_URL = '/api/docs' # URL for exposing Swagger UI (without trailing '/')
# Our API url (can of course be a local resource)
API_URL = ''

# Call factory function to create our handler
swagger_handlers = get_tornado_handler(
"app_name": "Test application"
# oauth_config={ # OAuth config. See .
# 'clientId': "your-client-id",
# 'clientSecret': "your-client-secret-if-required",
# 'realm': "your-realms",
# 'appName': "your-app-name",
# 'scopeSeparator': " ",
# 'additionalQueryStringParams': {'test': "hello"}
# }

class IndexHandler(tornado.web.RequestHandler):
def get(self):
self.finish("Tornado Swagger UI")

handlers = [
(r"/", IndexHandler)


def make_app():
return tornado.web.Application(handlers)

if __name__ == "__main__":
app = make_app()

# Now point your browser to localhost:5000/api/docs/


## Configuration

The handler supports overloading all Swagger UI configuration options that can be JSON serialized.
See for options.

Plugins and function parameters are not supported at this time.

OAuth2 parameters can be found at .


Based on the package:


Project details

Release history Release notifications

This version


Download files

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

Files for tornado-swagger-ui, version 0.1
Filename, size & hash File type Python version Upload date
tornado_swagger_ui-0.1-py3-none-any.whl (565.1 kB) View hashes Wheel py3
tornado_swagger_ui-0.1.tar.gz (560.2 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page