---
title: "flask-swagger-ui | pypx"
description: "Swagger UI blueprint for Flask"
canonical_url: "https://pypx.app/packages/flask-swagger-ui"
meta:
  "og:description": "Swagger UI blueprint for Flask"
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_flask-swagger-ui%2Cversion_5.35.0%2Csummary_Swagger%2BUI%2Bblueprint%2Bfor%2BFlask%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9mbGFzay1zd2FnZ2VyLXVpIg%2Cs_0Qlpurg_MUh5oNxc.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "flask-swagger-ui 5.35.0"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_flask-swagger-ui%2Cversion_5.35.0%2Csummary_Swagger%2BUI%2Bblueprint%2Bfor%2BFlask%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9mbGFzay1zd2FnZ2VyLXVpIg%2Cs_0Qlpurg_MUh5oNxc.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **flask-swagger-ui**

v5.35.0

Swagger UI blueprint for Flask

664 KB Python 3.8+ py3-none-anyMIT1 deps

[** Diff **](https://pypx.app/packages/flask-swagger-ui/diff)

`$ uv add flask-swagger-ui`

# flask-swagger-ui

Simple Flask blueprint for adding [Swagger UI](https://github.com/swagger-api/swagger-ui) to your flask application.

Included Swagger UI version: 5.35.0.

**This project is automatically updated to latest Swagger UI version on a weekly basis, but is otherwise not actively maintained.**

## Installation

`pip install flask-swagger-ui`

## Usage

Example application:

```
from flask import Flask
from flask_swagger_ui import get_swaggerui_blueprint

app = Flask(__name__)


SWAGGER_URL = '/api/docs'  # URL for exposing Swagger UI (without trailing '/')
API_URL = 'https://petstore.swagger.io/v2/swagger.json'  # Our API url (can of course be a local resource)

# Call factory function to create our blueprint
swaggerui_blueprint = get_swaggerui_blueprint(
    SWAGGER_URL,  # Swagger UI static files will be mapped to '{SWAGGER_URL}/dist/'
    API_URL,
    config={  # Swagger UI config overrides
        'app_name': "Test application"
    },
    # oauth_config={  # OAuth config. See https://github.com/swagger-api/swagger-ui#oauth2-configuration .
    #    'clientId': "your-client-id",
    #    'clientSecret': "your-client-secret-if-required",
    #    'realm': "your-realms",
    #    'appName': "your-app-name",
    #    'scopeSeparator': " ",
    #    'additionalQueryStringParams': {'test': "hello"}
    # }
)

app.register_blueprint(swaggerui_blueprint)

app.run()

# Now point your browser to localhost:5000/api/docs/

```

## Configuration

The blueprint supports overloading all Swagger UI configuration options that can be JSON serialized. See https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md#parameters for options.

Plugins and function parameters are not supported at this time.

OAuth2 parameters can be found at https://github.com/swagger-api/swagger-ui#oauth2-configuration .

## **Details **

<dl>

<dt>Version</dt>
<dd>5.35.0</dd>

<dt>License</dt>
<dd>MIT</dd>

<dt>Python</dt>
<dd>&gt;=3.8</dd>

<dt>Maintainer</dt>
<dd>Svein Tore Koksrud Seljebotn &lt;sveint@gmail.com&gt;</dd></dl>

## **Links**

- [Homepage](https://github.com/sveint/flask-swagger-ui)
- [View on PyPI](https://pypi.org/project/flask-swagger-ui/)

## **Release Cadence **

**18**

releases in the past year

avg 123 days between releases

## **Maintainers **

- Svein Tore Koksrud Seljebotn · [sveint@gmail.com](mailto:sveint@gmail.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/flask-swagger-ui#webpage","@type":"WebPage","description":"Swagger UI blueprint for Flask","name":"flask-swagger-ui","url":"https://pypx.app/packages/flask-swagger-ui","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/flask-swagger-ui"]}]},{"@id":"https://pypx.app/packages/flask-swagger-ui#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Swagger UI blueprint for Flask","license":"MIT","name":"flask-swagger-ui","softwareVersion":"5.35.0"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
