Flasgger is a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API. Flasgger also comes with SwaggerUI embedded so you can access it and visualize and interact with your API resources. Flasgger also provides validation of the incoming data, using the same specification it can validate if the data received as a POST, PUT, PATCH is valid against the schema defined using YAML, Python dictionaries or Marshmallow Schemas. Flasgger can work with simple function views or MethodViews using docstring as specification, or using @swag_from decorator to get specification from YAML or dict and also provides SwaggerView which can use Marshmallow Schemas as specification. Flasgger is compatible with Flask-RESTful so you can use Resources and swag specifications together, take a look at the restful example. Flasgger also supports Marshmallow APISpec as base template for specification.

Features

  • Auto-parse external YAML docs and MethodViews
  • Handle multiple http methods and routes for a single function
  • Use docstrings as specification
  • Use dictionaries as raw specs
  • Use Flask RESTful Resources
  • Use the same data to validate your API POST body

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Flasgger

Flasgger Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Flasgger!

Additional Project Details

Programming Language

Python

Related Categories

Python Software Development Software, Python User Interface (UI) Software

Registered

2022-03-16