Skip to main content

flask-swagger-ui

Simple Flask blueprint for adding Swagger UI to your flask application.

Included Swagger UI version: 5.32.14.

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 .

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_swagger_ui-5.32.14.tar.gz (628.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_swagger_ui-5.32.14-py3-none-any.whl (633.5 kB view details)

Uploaded Python 3

File details

Details for the file flask_swagger_ui-5.32.14.tar.gz.

File metadata

  • Download URL: flask_swagger_ui-5.32.14.tar.gz
  • Upload date:
  • Size: 628.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for flask_swagger_ui-5.32.14.tar.gz
Algorithm Hash digest
SHA256 a77954c6332eed0f92682b7bd7ef749f63127f7365a84a9a8a687e26fcc43a0e
MD5 5f4b5ebdfef9f0b45e1f57bf760c8349
BLAKE2b-256 c62dc1089dacb527e36e41daf1b90caf5c60fc350e3e584cfc46974fb9781f4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_swagger_ui-5.32.14.tar.gz:

Publisher: release.yml on sveint/flask-swagger-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flask_swagger_ui-5.32.14-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_swagger_ui-5.32.14-py3-none-any.whl
Algorithm Hash digest
SHA256 8355aa4d612baec45096ff5838a0f3509e6941e0062d82fb4b1099d46dc02865
MD5 96e58e89217bb8d4dcb2bad4e60d9080
BLAKE2b-256 7f6f62a41bd147805cd3b96ee34ee51f698000ace1ca755bfa3e4694ae4cb013

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_swagger_ui-5.32.14-py3-none-any.whl:

Publisher: release.yml on sveint/flask-swagger-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

5.32.14 This release

2 files

5.32.13

2 files

5.32.12

2 files

5.32.11

2 files

5.32.9

2 files

5.32.8

2 files

5.32.6

2 files

5.32.5

2 files

5.32.4

2 files

5.32.2

2 files

5.32.1.post2

2 files

5.21.0

2 files

4.11.1

2 files

3.36.0

1 file

3.25.0

1 file

3.20.9

1 file

3.18.0

1 file

3.6.0

1 file

3.0.12

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page