Skip to main content

A library for generating and publishing Swagger specifications for Flask applications.

Project description

Flask Swagger Generator

Flask swagger generator is a library to create Swagger Open API definitions for Flask based applications. Swagger is an Interface Description Language for describing REST APIs expressed using JSON and YAML.

Installing

Install and update using pip:

pip install flask-swagger-init

Documentation and Examples

COMING SOON

A Simple Example

from flask import Flask
from flask_swagger_generator.generators.swagger_view import SwaggerView


# Create the flask app
app = Flask(__name__)
...
# Create all the routes for the app
...

# Note: The swagger view must be created after all the routes have been created
# Create and publish the swagger view
SwaggerView.init(app=app, 
                 application_version='1.0.0', 
                 application_name='My API', 
                 application_description='My API description')

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Based on

This application is based on the flask-swagger-generator project by Coding Kitties.

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-swagger-init-24.14.1.tar.gz (16.2 kB view hashes)

Uploaded Source

Built Distribution

flask_swagger_init-24.14.1-py3-none-any.whl (28.7 kB 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