flask-swagger-ui
Simple Flask blueprint for adding Swagger UI to your flask application.
Included Swagger UI version: 5.33.0.
This project is automatically updated to latest Swagger UI version on a weekly basis, but is otherwise not actively maintained.
Installation
pip install flask-swagger-ui
Usage
Example application:
from flask import Flask
from flask_swagger_ui import get_swaggerui_blueprint
app = Flask(__name__)
SWAGGER_URL = '/api/docs' # URL for exposing Swagger UI (without trailing '/')
API_URL = 'https://petstore.swagger.io/v2/swagger.json' # Our API url (can of course be a local resource)
# Call factory function to create our blueprint
swaggerui_blueprint = get_swaggerui_blueprint(
SWAGGER_URL, # Swagger UI static files will be mapped to '{SWAGGER_URL}/dist/'
API_URL,
config={ # Swagger UI config overrides
'app_name': "Test application"
},
# oauth_config={ # OAuth config. See https://github.com/swagger-api/swagger-ui#oauth2-configuration .
# 'clientId': "your-client-id",
# 'clientSecret': "your-client-secret-if-required",
# 'realm': "your-realms",
# 'appName': "your-app-name",
# 'scopeSeparator': " ",
# 'additionalQueryStringParams': {'test': "hello"}
# }
)
app.register_blueprint(swaggerui_blueprint)
app.run()
# Now point your browser to localhost:5000/api/docs/
Configuration
The blueprint supports overloading all Swagger UI configuration options that can be JSON serialized. See https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#parameters for options.
Plugins and function parameters are not supported at this time.
OAuth2 parameters can be found at https://github.com/swagger-api/swagger-ui#oauth2-configuration .
Release files for flask-swagger-ui 5.33.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask_swagger_ui-5.33.0.tar.gz | 639.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_swagger_ui-5.33.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / flask_swagger_ui-5.33.0.tar.gz
| Download URL | flask_swagger_ui-5.33.0.tar.gz |
|---|---|
| Size | 639.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96ec9bbb2ddc004123b722242111a08f074f04d2c93dfbd3682f7720cd5f80e2
|
|
BLAKE2b-256 checksum How to use checksums |
a59c3b4ff2c907d5e4fe872bf593250bf3ef0725da24c26a7348a4df08b86eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logRelease files / flask_swagger_ui-5.33.0-py3-none-any.whl
| Download URL | flask_swagger_ui-5.33.0-py3-none-any.whl |
|---|---|
| Size | 644.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
183a0234fa0e0e001fbb1a5f8a4aa762729f7eaf34ff288bd7a00514a6ab7381
|
|
BLAKE2b-256 checksum How to use checksums |
bcf9c0900ac012e625f902ec3445e22ed6ab5c5325a05416db0c45356c996394
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency log