skillfed

swagger-ui-bundle

Swagger UI bundled for usage with Python

swagger-ui-bundle v1.1.0 3.5M downloads/30d#2,580 on PyPI21
Permissive license Apache-2.0 AGING released

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-bundle

uv

uv add swagger-ui-bundle

poetry

poetry add swagger-ui-bundle

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

swagger ui static files pythonapi documentation ui bundleswagger ui integrationopenapi spec viewerrest api docs server
api-documentationswagger-openapi

More Software Development packages

typing-extensions

Provides backported and experimental type hints…

permissive · top 100 on PyPI

numpy

NumPy provides an N-dimensional array object…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

distlib

Distlib provides low-level packaging utilities…

permissive · top 1,000 on PyPI

flask-swagger-ui

Adds Swagger UI to Flask applications as a…

permissive · top 5,000 on PyPI

swagger-ui-py

Integrates Swagger UI documentation into Python…

permissive · top 15,000 on PyPI

flask-swagger

Extracts Swagger 2.0 API specifications from…

permissive · top 15,000 on PyPI

flask-openapi3-swagger

Provides Swagger UI integration for…

permissive · top 15,000 on PyPI

drf-spectacular-sidecar

Serves pre-built Swagger UI and Redoc…

permissive · top 5,000 on PyPI

mkdocs-swagger-ui-tag

A MkDocs plugin that embeds Swagger UI directly…

permissive · top 15,000 on PyPI

aiohttp-swagger

Generates Swagger API documentation and…

permissive · top 15,000 on PyPI

mkdocs-render-swagger-plugin

Renders Swagger and OpenAPI schemas as…

permissive · top 15,000 on PyPI

flask-openapi3-elements

Provides the Stoplight Elements UI for…

permissive · top 15,000 on PyPI

swagger-plugin-for-sphinx

A Sphinx plugin that embeds interactive Swagger…

permissive · top 5,000 on PyPI