--- id: swagger-ui-py version: "25.7.1" license: Apache License 2.0 license_treatment: permissive maintenance: aging --- # swagger-ui-py — Swagger UI for Python web framework, such as Tornado, Flask, Quart, Sanic and Falcon. License: permissive · Maintenance: aging · Downloads: 146.7K/mo ## What it is and what it does Swagger-ui-py is a bridge that adds interactive Swagger UI documentation to Python web applications. It works with a wide range of frameworks—Flask, Tornado, Sanic, aiohttp, Quart, Starlette, Falcon, Bottle, and Chalice—by injecting a documentation endpoint that serves the Swagger UI interface. You provide an OpenAPI/Swagger specification (as a local YAML/JSON file, a remote URL, a Python dict, or a JSON string), and the package renders it as an interactive, browsable API explorer at a URL you choose. The package depends on jinja2 for templating, packaging for version handling, and PyYaml for configuration parsing. It bundles Swagger UI v5.25.3 and Swagger Editor v4.14.6, allowing both read-only documentation viewing and optional in-browser editing of your API spec. Configuration is straightforward: a single function call with your app instance and spec source, plus optional parameters for Swagger UI behavior and OAuth2 settings. Use it for: - Add interactive API documentation to a Flask or Tornado REST API without writing HTML or maintaining separate docs. - Serve Swagger UI from a local OpenAPI spec file in a multi-framework Python web application. - Enable in-browser editing of your API specification with the built-in Swagger Editor. - Integrate OAuth2 configuration into your API docs for testing authenticated endpoints. - Support multiple Python web frameworks with a single documentation integration pattern. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates Swagger UI documentation into Python web frameworks (Flask, Tornado, Sanic, aiohttp, Quart, Starlette, Falcon, Bottle, Chalice) to serve interactive API documentation from OpenAPI/Swagger specifications. Yes, if you need to add Swagger UI documentation to a Python web application. The package is straightforward to integrate, has low install friction, carries no known vulnerabilities, and works across many popular frameworks. The aging maintenance status (409 days since last release) is a minor concern but not a blocker—the repository is still active and the functionality is stable. Install it when you want interactive API docs without building custom documentation infrastructure. ## Install pip install swagger-ui-py uv add swagger-ui-py poetry add swagger-ui-py ## Installing swagger-ui-py Before you install: Low install friction with three lightweight runtime dependencies (jinja2, packaging, PyYaml). Maintenance status is aging—last release was 409 days ago—but the repository remains active and unarchived with recent commits. License in practice: Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install swagger-ui-py from swagger_ui import api_doc api_doc(app, config_path='./config/test.yaml', url_prefix='/api/doc', title='API doc') Requires Python 3.0 or later; your web framework (Flask, Tornado, etc.) must be installed separately. Verify before relying: - Whether the 409-day gap since last release signals maintenance concerns or stable maturity for this use case. - Performance characteristics when serving large or complex OpenAPI specifications. - Compatibility with the latest versions of supported frameworks (Flask, Tornado, Sanic, etc.). ## Package facts - License: Apache License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 146.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags swagger ui python web framework, openapi documentation flask tornado, interactive api docs python, swagger ui integration, api documentation generator python, openapi spec viewer, rest api docs python, api-documentation, openapi-swagger, web-framework-integration [View on SkillFed](https://skillfed.io/packages/swagger-ui-py) · [View on PyPI](https://pypi.org/project/swagger-ui-py/)