Skip to main content

Swagger UI Application for Falcon

Project description


Buy Me A Coffee

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

Included Swagger UI version: v3.25.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.

Files for falcon-swagger-ui, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size falcon_swagger_ui-1.2.0-py3-none-any.whl (2.5 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size falcon-swagger-ui-1.2.0.tar.gz (2.5 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page