Skip to main content

Next generation OpenAPI v3 Integration for Flask based APIs. Based on Flasgger.

Project description

Flask-OpenAPI3-UI

Python PyPi PyPi Flask-OpenAPI3-UI

Next generation OpenAPI v3 Integration for Flask based APIs. Based on Flasgger.

Install

pip install Flask-OpenAPI3-UI

Usage

You can start your Swagger spec with any default data providing a template:

from flask_openapi import Swagger

def main():
  app = create_app()
  app.config['SWAGGER'] = {
      "uiversion": 3,
      "openapi": "3.0.3",
      "info": {
          "title": "API documentation",
          "description": "API docs for ",
          "version": 1.0.0
      },
      "swagger_ui": True,
      "basePath": "/api",  # base bash for blueprint registration
      "components": {
          "securitySchemes": {
              "bearerAuth": {
                  "type": "http",
                  "scheme": "bearer",
                  "bearerFormat": "JWT"
              }
          }
      },
      "title": "API docs",
      "optional_fields": ["components", "tags", "paths"],
      "doc_dir": "/home/admin/flaskapp/src/api/",
  }
  Swagger(app=app)

And then the template is the default data unless some view changes it. You can also provide all your specs as template and have no views. Or views in external APP.

Project details


Download files

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

Source Distribution

Flask-OpenAPI3-UI-1.8.0.tar.gz (3.8 MB view hashes)

Uploaded Source

Built Distribution

Flask_OpenAPI3_UI-1.8.0-py3-none-any.whl (3.9 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page