Videos, Slides, Films

Springer Nature computing video. Asynchronous python programming with asyncio and async/await

Available as
Online
Summary

Asynchronous Python Programming using asyncio and async/await lets you write code that runs many processes concurrently. It makes your code more responsive and stops it from wasting time waiting fo...

Asynchronous Python Programming using asyncio and async/await lets you write code that runs many processes concurrently. It makes your code more responsive and stops it from wasting time waiting for slow file and internet access. It is simpler to write, easier to reason about, and uses less memory than threads and processes. We start the video with an overview of asyncio, showing the building blocks and core syntax in a few simple examples. Next, you will see how to make normal Python code work in an asynchronous environment, to minimize blocking and facilitate cooperative multi-tasking. Further, we cover an asyncio use-case working with network connections such as web servers using asynio's streams API, followed by communication between coroutines and synchronization of coroutines. We will also look at using the asyncio library to easily wrap blocking code into threads and processes, and some non-blocking replacement libraries used with asyncio such as aiohttp and aiofiles. The uvloop and unsync libraries will be discussed as ways to speed up and simplify your asyncio code. The following section covers writing more robust asyncio code to test and debug your code, handle stuck tasks using time out, logging and error handling and task management.

Details

Additional Information