Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

The asyncio Event Loop

Give Feedback

In this lesson, you’ll learn about the Event Loop. You’ll see what it is and how to define one. The Event Loop is used to:

  • perform IO tasks
  • run asynchronous tasks
  • run callbacks

In addition to learning about what it is, you’ll see how to change a normal main() function into an event loop. You’ll see how to create numerous coroutines using Future objects and gather(). In the last section of the lesson, you’ll see an example demonstrating how using an asynchronous approach can make your code run faster.

dgoodson12722 on March 3, 2020

You are an awesome instructor with the gift of making asyncio seem easy! Please, do more videos like this, please!

Angad on Aug. 6, 2020

Awesome instructor . Thank you . Please post more lessons on realpython.

Become a Member to join the conversation.