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 details)

Uploaded Source

Built Distribution

File details

Details for the file flask-schematics-swagger-0.0.6.tar.gz.

File metadata

File hashes

Hashes for flask-schematics-swagger-0.0.6.tar.gz
Algorithm Hash digest
SHA256 4901d3c663c588596bcf0fc51efa2cd4e29616154aca1eb0a79ee516396c8b2b
MD5 1ceea919e19b59208903c8a71ab53cff
BLAKE2b-256 76da436b82dadc0c0b9a1abaf013d668650f3e96378027f77a3a3e2548235cf2

See more details on using hashes here.

File details

Details for the file flask_schematics_swagger-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_schematics_swagger-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7ac8075344f0a7a37976e5fb7aa632b436dfc744bc665895e024fd1053bef6c1
MD5 c2ae6e0a7dfdfd369abd1574cc867b48
BLAKE2b-256 c5452c50520fce3e76c0169dd1df5c55f3a83eeba867c896b277b80fc1193551

See more details on using hashes here.

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