Hi! I'm the author of this post. I've been writing asynchronous Python code with async/await for quite a while but didn't have a perfect understanding of how it actually works: what await does; what an event loop really is and how it runs coroutines; what coroutines are; why Python has native coroutines as well as generator-based coroutines; how asyncio works; and so forth... In this post I've tried to answer all these questions. After reading it, you should be able to reason about async/await code almost as easily as you reason about regular Python code.<p>If you liked this post, you may also like other posts in my Python behind the scenes series: <a href="https://tenthousandmeters.com/tag/python-behind-the-scenes/" rel="nofollow">https://tenthousandmeters.com/tag/python-behind-the-scenes/</a><p>As always, I welcome your feedback and questions. Thanks!
Interesting to see this language feature being broken down in python. Just today I was looking at async/await & generator in js (and wrote a summary here <a href="https://stackoverflow.com/a/69055066" rel="nofollow">https://stackoverflow.com/a/69055066</a> while still trying to wrap my head around redux-saga <a href="https://redux-saga.js.org/" rel="nofollow">https://redux-saga.js.org/</a>)<p>Haven’t done python for a while; was ‘t aware js & python share such resemblances!
Thanks, super interesting read!<p>Side note: I've been desperately looking for a simple, clear and practical "getting started" guide of async/await in python. Any link you can recommend?