flask-swagger-ui
Swagger UI blueprint for Flask
Decision gist · record as of 2026-08-14
Yes. Low install friction, permissive MIT license, active maintenance (weekly updates), no known vulnerabilities, and a single Flask dependency make this a straightforward choice for adding Swagger UI to Flask apps. The trade-off is that plugins and custom function parameters are not supported—if you need those, you would need to serve Swagger UI separately or fork the package.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only Flask as a runtime dependency.
- Actively maintained on a weekly update cycle to track Swagger UI releases, with recent activity (last commit 2026-08-03).
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted commercial and private use, modification, and distribution with minimal obligations.
last release 2026-08-03 (11 days) · last repo commit 2026-08-03 · 187 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 826,336 downloads/mo, #4,961 on PyPI
Alternatives
Verify before relying
pip install flask-swagger-ui
from flask import Flask
from flask_swagger_ui import get_swaggerui_blueprint
app = Flask(__name__)
swaggerui_blueprint = get_swaggerui_blueprint(
'/api/docs',
'https://petstore.swagger.io/v2/swagger.json'
)
app.register_blueprint(swaggerui_blueprint)
app.run()- Whether the weekly Swagger UI update cycle is fully automated or requires manual review before release
- Performance impact of serving Swagger UI on applications with high traffic
- Support status for Swagger UI features beyond JSON-serializable configuration (plugins, custom functions)
What it is and what it does
flask-swagger-ui is a Flask blueprint that embeds Swagger UI directly into your Flask application, allowing you to serve interactive API documentation from any Swagger/OpenAPI specification. It wraps the official Swagger UI (currently version 5.32.12) and exposes it at a configurable URL path, letting developers and API consumers explore endpoints, try requests, and view schemas without leaving your app.
The package is lightweight—it depends only on Flask—and stays current with Swagger UI releases through an automated weekly update process. You configure it by passing a specification URL (local or remote) and optional Swagger UI settings to a factory function, then register the resulting blueprint with your Flask app. It supports standard Swagger UI configuration options that can be JSON-serialized, including OAuth2 parameters, but does not support plugins or custom function parameters.
Use it for
- Embed interactive API documentation in a Flask microservice without external hosting or separate documentation sites.
- Let API consumers test endpoints directly from your application with a familiar Swagger UI interface.
- Serve Swagger UI for a remote OpenAPI specification (e.g., from a third-party API) alongside your own Flask routes.
- Configure OAuth2 authentication flows within Swagger UI for APIs that require token-based access.
- Keep API documentation in sync with your Swagger UI version by relying on automatic weekly updates.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, permissive MIT license, active maintenance (weekly updates), no known vulnerabilities, and a single Flask dependency make this a straightforward choice for adding Swagger UI to Flask apps. The trade-off is that plugins and custom function parameters are not supported—if you need those, you would need to serve Swagger UI separately or fork the package.
Install
flask-swagger-ui on PyPI
Before you install
Low friction: pure Python wheel with only Flask as a runtime dependency. Actively maintained on a weekly update cycle to track Swagger UI releases, with recent activity (last commit 2026-08-03).
License in practice
MIT license permits unrestricted commercial and private use, modification, and distribution with minimal obligations.
Quickstart
pip install flask-swagger-ui
from flask import Flask
from flask_swagger_ui import get_swaggerui_blueprint
app = Flask(__name__)
swaggerui_blueprint = get_swaggerui_blueprint(
'/api/docs',
'https://petstore.swagger.io/v2/swagger.json'
)
app.register_blueprint(swaggerui_blueprint)
app.run()
Verify before relying
- Whether the weekly Swagger UI update cycle is fully automated or requires manual review before release
- Performance impact of serving Swagger UI on applications with high traffic
- Support status for Swagger UI features beyond JSON-serializable configuration (plugins, custom functions)
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageflask |
| Maintenance | Actively maintained 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 826,336 / month, #4,961 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: Python :: 3 |
Evidence: flask_swagger_ui-5.32.12-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flask swagger ui documentation”
- flask-swagger-uiAdds Swagger UI to Flask applications as a blueprint, serving…
- flask-swaggerExtracts Swagger 2.0 API specifications from Flask applications by…
- flasggerFlasgger extracts OpenAPI specifications from Flask views and serves…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also flask-swagger · swagger-ui-bundle · swagger-ui-py · aiohttp-swagger · flask-openapi3-swagger · flask-restx · mkdocs-render-swagger-plugin · mkdocs-swagger-ui-tag · flask-restplus · swagger-plugin-for-sphinx