Hacker News new | past | comments | ask | show | jobs | submit login

Flask was incredible and a joy to build with, but it's not the future. It's only the present in that so any legacy apps exist that use it and because people who don't knew better will likely still stumble upon it first and use it for their new project.

But we are at the point where async python has really taken off, as well as where the performance gains are just impossible to ignore except for apps thats are either dead-simple or that are super CPU-bound. And FastAPI is unquestionably leading the pack with regards to async frameworks, so it makes sense to target that. (Also, yes, he's the creator.)

(Additionally, FastAPI is using Starlette under-the-hood, which is built on ASGI, part of the point of which is to standardize async servers and frameworks to allow for wide compatibility. Anything that works on Starlette or any ASGI framework will work with FastAPI, and vice versa unless the component is tightly coupled to FastAPI-specific code.)




New Flask 2.0 supports async views and handlers though they admit it's not as performant as async-first frameworks

But I agree largely that Flask is now a thing of the past. If you want to very quickly bring a small API server or a simple view page up then it's fine. For almost anything more complex, it's a huge pain. The ecosystem is extremely fragmented and lots of vital plugins for core systems like caching, auth and such aren't maintained anymore. For someone starting a new project, even if it's a very small web server I'd prefer FastAPI




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: