swagger-ui-bundle
Swagger UI bundled for usage with Python
What it is and what it does
swagger-ui-bundle packages the static files from the Swagger UI project into a Python distribution, making it easy to integrate interactive API documentation into web applications without manually managing external assets. It includes Jinja2 templating support for basic configuration, allowing developers to customize the UI through template variables rather than modifying static files directly.
The package is webserver-agnostic and designed to work with any Python web framework. You import swagger_ui_path to get the directory containing all the UI assets, then serve them through your framework's static file mechanism. Configuration options like the OpenAPI spec URL can be templated and rendered on demand using Jinja2.
Use it for:
- Serve Swagger UI documentation alongside a REST API without managing external CDN dependencies
- Customize API documentation appearance by rendering Jinja2 templates with application-specific configuration
- Bundle interactive API docs into a self-contained Python application for offline or internal deployment
- Quickly prototype an API with live documentation by serving the static bundle through a web framework
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Packages Swagger UI's static files and templates as a Python distribution, allowing web frameworks to serve interactive API documentation without bundling the files separately.
Yes, if you need to serve Swagger UI documentation from a Python web application. The package has low install friction, permissive Apache 2.0 licensing, and no known vulnerabilities. The aging maintenance status (1017 days since last release) is a minor concern but acceptable given that it's a stable wrapper around static assets rather than active-development code.
Install
swagger-ui-bundle on PyPI
pip
pip install swagger-ui-bundleuv
uv add swagger-ui-bundlepoetry
poetry add swagger-ui-bundleInstalling swagger-ui-bundle
Before you install
Low install friction with only two lightweight runtime dependencies (Jinja2 and importlib_resources). The package is aging (1017 days since last release) but remains in production/stable status with an active repository.
License in practice
Licensed under Apache 2.0, a permissive open-source license that allows commercial use, modification, and distribution with minimal restrictions.
Quickstart
from swagger_ui_bundle import swagger_ui_path
import Jinja2
# swagger_ui_path points to the directory containing static UI files
# Render templates with Jinja2 for configuration
template_vars = {"openapi_spec_url": "https://example.com/spec.json"}
# Serve swagger_ui_path as static files through your web framework
Verify before relying
- Whether the bundled Swagger UI version is current relative to upstream swagger-ui releases
- Performance characteristics when serving to high-traffic API documentation endpoints
- Specific web framework integration patterns beyond the documented example
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — Jinja2, importlib_resources |
| Maintenance | aging — 1,017 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,545,052/month — #2,580 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: swagger_ui_bundle-1.1.0-py3-none-any.whl
Keywords: swagger-ui
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
flask-swagger-uiAdds Swagger UI to Flask applications as a…
permissive · top 5,000 on PyPI
swagger-ui-pyIntegrates Swagger UI documentation into Python…
permissive · top 15,000 on PyPI
flask-swaggerExtracts Swagger 2.0 API specifications from…
permissive · top 15,000 on PyPI
flask-openapi3-swaggerProvides Swagger UI integration for…
permissive · top 15,000 on PyPI
drf-spectacular-sidecarServes pre-built Swagger UI and Redoc…
permissive · top 5,000 on PyPI
mkdocs-swagger-ui-tagA MkDocs plugin that embeds Swagger UI directly…
permissive · top 15,000 on PyPI
aiohttp-swaggerGenerates Swagger API documentation and…
permissive · top 15,000 on PyPI
mkdocs-render-swagger-pluginRenders Swagger and OpenAPI schemas as…
permissive · top 15,000 on PyPI
flask-openapi3-elementsProvides the Stoplight Elements UI for…
permissive · top 15,000 on PyPI
swagger-plugin-for-sphinxA Sphinx plugin that embeds interactive Swagger…
permissive · top 5,000 on PyPI