Now this is my personal opinion, but you cannot say the same about FastAPI. Even though the ecosystem of asyncio compatible libraries has grown, it is still several orders of magnitude smaller than what is available for standard non-async Python. So in my view, in terms of access to 3rd party libraries Flask is a better choice.
The FastAPI docs read like a full project, a very dense project. Sometimes you just want to learn about a specific feature, but you walk into a page that assumes you have the context of the previous chapters, that puts me off a lot.
I also dislike how some of the documentation is absolutely enormous (the SQL chapters is one example), but I suspect this might have to do with the not-so-simple approach FastAPI takes, as opposed to Flask, which is indeed very simple.
I really can't join the crowd here. I don't think FastAPI is a replacement for Flask, even when async is taken out of the equation. Flask has some weird quirks to it (like "g"), but it really is a beautiful and simple API for the web.
But it could _really_ do with some "Reference" documentation. Sometimes I just want to know exactly what a call does or what the various parameters mean.
Pytorch, 8400
Pandas, 3400
Tensorflow, 2100
jupyter notebook, 2000
scikit-learn, 1500
pytest, 720
requests, 170
The outlier seem to be Flask.
django, 1101 open, 32662 closed
cherrypy, 218 open, 1505 closed
starlette, 31 open, 570 closed
pyramid, 70 open, 966 closed
falcon, 168 open, 789 closed
flask, 14 open, 2318 closed
fastapi, 1044 open, 1855 closed
Fast api has one of the worst ratio regarding open/closed issues.
Also fastapi allows people to ask questions with the issues. On the 1000+ open issues, 826 are tagged as question.
It's hard to find a fair metric. Open/close ratio rewards older project with fluctuating/stable popularity. Fastapi popularity is still growing[0], so having some difficulties to work on issues is expected.
[0] -- https://trends.google.com/trends/explore?date=today%205-y&q=...
As far as Swagger integration, you can use APIFairy with Flask and get similar type of auto-generated docs. Disclaimer, APIFairy is an extension that I created: https://github.com/miguelgrinberg/APIFairy
The difference is that even without the benefits of async, FastAPI offers a vastly better developer experience IMHO, with its integration with Pydantic, Python type hints and the lack of reliance on global objects