Skip to main content

Swagger UI Application for Falcon

Project description

Simple Falcon application for adding Swagger UI to your falcon application.

Included Swagger UI version: v3.10.0


pip install falcon-swagger-ui


Example application:

import falcon
from falcon_swagger_ui import register_swaggerui_app

app = falcon.API()

SWAGGERUI_URL = '/swagger'  # without trailing slash

### For developer environment you can expose a static endpoint like:
# import pathlib
# SCHEMA_URL = '/static/v1/swagger.json'
# STATIC_PATH = pathlib.Path(__file__).parent / 'static'
# @see:
# app.add_static_route('/static', str(STATIC_PATH))

page_title = 'Falcon Swagger Doc'
favicon_url = ''

    config={'supportedSubmitMethods': ['get'], }

Running the example application:

pip install falcon gunicorn jinja2
gunicorn example:app


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

In addition, some of the OAuth fields are exposed to special variables that will be rendered into the relevant function.

Application defaults are listed below (should match SwaggerUI defaults).

        # OAuth related
        'app_name': 'null',
        'client_realm': 'null',
        'client_id': 'null',
        'client_secret': 'null',

        # SwaggerUI base configuration, see
        'docExpansion': "none",
        'jsonEditor': False,
        'defaultModelRendering': 'schema',
        'showRequestHeaders': False,
        'supportedSubmitMethods': ['get', 'post', 'put', 'delete', 'patch']

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
falcon_swagger_ui-1.1.1-py3-none-any.whl (4.2 MB) Copy SHA256 hash SHA256 Wheel py3

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