6 ms·
Tell HN: Flask and Quart have now partially merged
Flask is a web microframework built to be used with WSGI servers and synchronous code. Quart is the same web microframework built to be used with ASGI servers and asynchronous code. In other words Flask and Quart are now the same base framework as they share the majority of their codebases.
This means that you can use the same framework API and understanding to write synchronous code with Flask, and asynchronous code with Quart.
It is important to note that Flask cannot be made asynchronous without breaking extension and backwards compatibility, or without using monkeypatching. Therefore, Quart is best viewed as a namespace for async/await usages.
Questions and comments very welcome. (I'm struggling a little thinking about how best to communicate this)
- hardwaresofton 3y agoLinks: https://quart.palletsprojects.com/en/latest/ https://quart.palletsprojects.com/en/latest/ https://flask.palletsprojects.com/en/3.0.x/ https://flask.palletsprojects.com/en/3.0.x/ TIL about the new Flask logo!
- pgjones 3y agoThere are new logos for all the Pallets projects and Pallets itself, based on a common theme.
- ps256 3y agoIs there are any reason to pick Flask over FastAPI for a new project in 2023?
- pgjones 3y agoYes, I've written about this comparison in detail https://pgjones.dev/blog/fastapi-flask-quart-2022/ https://pgjones.dev/blog/fastapi-flask-quart-2022/.
- dansult 3y agoFlask definitely wins the documentation and maintenance department. FastAPI has "shiny" docs. Flask at least has an API reference.
- ps256 3y agoYes, I don't get it when people praise FastAPI's docs - they're more like tutorials and examples rather than documentation.
- aynyc 3y agoSo I can use Quart part for my API service, and Flask for my UI service all in the same project structure?