July 2017
Beginner to intermediate
340 pages
7h 43m
English
The asyncio (https://docs.python.org/3/library/asyncio.html) library, which was originally an experiment called Tulip run by Guido, provides all the infrastructure to build asynchronous programs based on an event loop.
The library predates the introduction of async, await, and native coroutines in the language.
The asyncio library is inspired by Twisted, and offers classes that mimic Twisted transports and protocols. Building a network application based on these consists of combining a transport class (like TCP) and a protocol class (such as HTTP), and using callbacks to orchestrate the execution of the various parts.
But, with the introduction of native coroutines, callback-style programming is less appealing, since it's ...