Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Swagger with Flask [closed]

Is there a way to generate a RESTful API in Flask using Swagger?

like image 739
Adam Matan Avatar asked Jan 08 '14 11:01

Adam Matan


People also ask

Does Swagger work on Flask?

Flask-swagger provides a method (swagger) that inspects the Flask app for endpoints that contain YAML docstrings with Swagger 2.0 Operation objects. Flask-swagger supports docstrings in methods of MethodView classes and regular Flask view functions.

Is FastAPI better than Flask?

FastAPI surpasses Flask in terms of performance, and it is one of the fastest Python web frameworks. Only Starlette and Uvicorn are faster. Because of ASGI, FastAPI supports concurrency and asynchronous code by declaring the endpoints. For concurrent programming, Python 3.4 introduced Async I/O.


1 Answers

There is Flask-RESTPlus based on Flask-Restful until now. It provides some decorators to document your API and generate a Swagger specification, a Postman collection...

Next version will be able to generate the API from Swagger specifications.

like image 195
noirbizarre Avatar answered Oct 23 '22 07:10

noirbizarre