--- id: swagger-plugin-for-sphinx version: "7.2.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # swagger-plugin-for-sphinx — Sphinx plugin which renders a OpenAPI specification with Swagger License: permissive · Maintenance: active · Downloads: 3.8M/mo ## What it is and what it does This is a Sphinx extension that brings OpenAPI specification rendering into your documentation build. It acts as a bridge between Sphinx's documentation generation and Swagger UI, letting you embed interactive API explorers directly into your HTML docs. The plugin uses a simple directive to include OpenAPI YAML or JSON files, automatically copying them into your build output and rendering them with Swagger UI's interactive interface. The plugin depends on Sphinx, Jinja2, docutils, PyYAML, and typing_extensions to handle template rendering, specification parsing, and documentation generation. It supports multiple specifications per page with unique IDs, optional full-page rendering modes, and custom Swagger configuration options. You can point to CDN-hosted Swagger assets or mirror them locally into your documentation tree for offline or self-hosted deployments. Use it for: - Embed live API documentation in Sphinx-generated project docs alongside narrative guides - Render multiple OpenAPI specs on a single page with separate Swagger UI containers - Self-host API documentation by mirroring Swagger UI assets into your build output - Generate full-page Swagger UI views as part of your documentation site - Pass custom Swagger configuration options to control UI behavior and appearance ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Sphinx plugin that embeds interactive Swagger UI pages into documentation to render OpenAPI specifications with customizable configuration and optional local resource mirroring. Yes. The plugin is actively maintained, has no known vulnerabilities, carries a permissive license, and installs with low friction. It directly solves the problem of embedding interactive API docs into Sphinx projects. Install it if you use Sphinx and need to include OpenAPI specifications in your documentation. ## Install pip install swagger-plugin-for-sphinx uv add swagger-plugin-for-sphinx poetry add swagger-plugin-for-sphinx ## Installing swagger-plugin-for-sphinx Before you install: Low friction installation with a pure-Python wheel and five stable runtime dependencies. Active maintenance with a recent release (74 days ago) and ongoing repository activity. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain copyright and license notices. Quickstart: pip install swagger-plugin-for-sphinx # In conf.py: extensions = ["swagger_plugin_for_sphinx"] # In your .rst file: .. swagger-plugin:: path/to/spec.yaml Verify before relying: - Whether the plugin handles multiple OpenAPI versions or only specific versions - Performance characteristics when embedding large or complex OpenAPI specifications - Browser compatibility requirements for the generated Swagger UI pages ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sphinx openapi documentation, swagger ui sphinx plugin, embed swagger in docs, openapi spec renderer, sphinx api documentation, interactive api docs sphinx, swagger-ui integration, api-documentation, openapi, sphinx-extension [View on SkillFed](https://skillfed.io/packages/swagger-plugin-for-sphinx) · [View on PyPI](https://pypi.org/project/swagger-plugin-for-sphinx/)