A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://realpython.com/lessons/python-asyncio-summary-recap/ below:

Summary & Recap (Video) – Real Python

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

Unlock This Lesson

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

Unlock This Lesson

Python asyncio: Summary & Recap

Recap of everything you’ve covered in this course. In this course, you learned:

Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.

00:00 Congratulations on finishing! Now that you’re done, what I’d like to do is go back over the objectives. So, number one, what is asyncio? Once again, I mentioned that asyncio is a library in Python that’s used in case you have an IO bound-application—you have an app and it’s slow and it’s slow because you’re doing a lot of IO.

00:20 You’re talking to a database, you’re talking to a file system, you’re talking to some website and it’s slow. asyncio can definitely help the performance with that.

00:27 We set up this project together, I showed you what generators are using the yield keyword. We set up coroutines, which are similar to generators. Remember, generators are producers; coroutines are like consumers.

00:40 Coroutines are asynchronous, you have to use the async keyword and also await—the async/await keywords.

00:47 And then asynchronous generators are generators that produce values,

00:51 but produce them asynchronously, so you don’t know how often that they will actually produce those values. And those async generators are a combination of generators and coroutines. Then finally, we built a real-world application, which went out to some website and requests n number of random numbers from this website, and then brought it back and then used it in our application.

01:13 But we created, I think, nearly 30 coroutine tasks that seemed to run essentially in parallel, and our speed on it was actually really fast, versus something that, if you were to do them sequentially one after the other after the other, would have been a lot slower.

01:29 So, hopefully, this tutorial helped you out with asyncio and maybe it gave you some ideas of how you can use asyncio in your project to increase your performance. Thank you.

Course Contents


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4