Summary
Flask 2.2 is now at par with the other frameworks that support and utilize asynchronous solutions to improve the application’s runtime performance. Its view and API functions can now be async
and runnable on an event loop created by Flask. Asynchronous services and transactions can now be executed and awaited on the Flask platform as tasks created by create_task()
and ensure_future()
.
The latest SQLAlchemy[async] can easily integrate with the Flask application to provide asynchronous CRUD transactions. Also, creating asynchronous tasks to break down the sequence of blocking transactions in Celery background processes, WebSocket messaging, and Observable operations are now possible with Flask 2.2.
Moreover, designing loosely coupled components, application-scoped cross-cut concern solutions, and some distributed setups is now feasible with Flask 2.2 through the built-in asynchronous signals.
There is even a 100% asynchronous Flask framework called Quart that...