Skip to main content

Flask Swagger generator for Schematics models.

Project description

Flask Schematics Swagger

PR PyPI version

Flask Swagger generator for Schematics models.

Install

Install library by using pip command,

$ pip3 install flask-schematics-swagger

Usage

from flask import Flask, request
from fss import FlaskSchematicsSwagger

app = Flask('app')
fss = FlaskSchematicsSwagger(app)


@app.get('/users')
def get_users() -> dict:
    """
    Get list of users

    :parameter query integer user_id: the user id filter. default: None
    :response 200 schema.user.UserGetResponse:
    :return: flask response as dictionary
    """
    user_id = request.args.get('user_id')

    # ...

    return response.to_primitive()


if __name__ == '__main__':
    fss.add_route()
    app.run()

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-schematics-swagger-0.0.6.tar.gz (2.6 MB view hashes)

Uploaded Source

Built Distribution

flask_schematics_swagger-0.0.6-py3-none-any.whl (2.7 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