Summary
Web frameworks constitute one of the most widely used tools in the Python ecosystem. The breadth of their solution space has proven its usefulness across a range of use cases, starting with classical CRUD applications and taking in data pipelines, REST and GraphQL APIs, and intensive UI experiences. Asynchronous programming extends their capabilities to new horizons of scalability by providing support for new protocols and technologies.
In this chapter we have instrumented two of the most popular hybrid Python synchronous/asynchronous frameworks: Flask and Django. That instrumentation requires not only changes to support asynchronous code but also changes to the way in which it is executed.
Both frameworks evolved to derive some of the benefits of the asynchronous paradigm without disrupting the developer experience or deployment requirements. Nevertheless, new frameworks offering native support provide clear benefits for clean-sheet projects by leveraging the capabilities...