Building Asynchronous Transactions
After rigorous discussion on the core components and advanced features of the Flask 3.0 framework, this chapter will explore Flaskās capability to manage requests and responses asynchronously and its ability to execute asynchronous services and repository transactions.
Flask was originally a standard Python framework that ran on the Web Server Gateway Interface (WSGI)-based platform popular in managing blocking processes. But Flask 3.0 supports the creation and execution of non-blocking view and API functions. It can run transactions using some asyncio
utilities and build asynchronous repository transactions with SQLAlchemy 2.x.
This chapter will also explore other avenues that help provide Flask applications with the fastest performance using asynchronous mechanisms, such as Celery tasks, task queues, WebSocket, and server push. The chapter will also introduce Quart, the asynchronous Flask-based platform that can build and run all components...