Skip to main content

Adding swagger ui on your AWS Lambda Function using a Flask blueprint

Project description

aws_flask_lambda_swagger_ui

New version includes the templates folder

Installation

Install the package using pip:

pip install aws-flask-lambda-swagger-ui

Usage

from flask import Flask
from aws_flask_lambda_swagger_ui import get_swaggerui_blueprint

app = Flask(__name__)

SWAGGER_URL = '/aws/test/docs' 
API_URL = 'https://petstore.swagger.io/v2/swagger.json' 

swaggerui_blueprint = get_swaggerui_blueprint(
    SWAGGER_URL,  
    API_URL,
    config={  
        'app_name': "AWS Lambda application"
    }
)

app.register_blueprint(swaggerui_blueprint, url_prefix=SWAGGER_URL)

if __name__ == '__main__':
    app.run(debug=True)

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

aws_flask_lambda_swagger_ui-0.1.3.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

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