Introducing asyncio

asyncio is a Python module that is part of its standard library. It allows you to write single-threaded asynchronous code and implement concurrency in Python. This module is available from Python 3.4 and its documentation is available at https://docs.python.org/3/library/asyncio.html.

Basically, asyncio provides an event loop for asynchronous programming. For example, if we need to make requests without blocking the main thread, we can use the asyncio library. Python 3.4 provides an asyncio module that has event loops and coroutines for I/O operations and networking, futures, and tasks. In the next section, we will review these elements.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset