"An event loop is when we let some stuff that takes a long time do it's thing in the background. And when it's all set, the 'event loop' will 'pick it up'." is the most helpful and intuitive definition of event loop I've heard.
@vnagaraviАй бұрын
I have so many questions. So, we have two functions running in the background, correct? And another main function, also known as the event loop, continuously monitors both functions for completion. Is it using threading to create worker threads to complete those tasks? And monitoring with the main thread? I kindly request clarification on these matters.
@werthersoriginal3 жыл бұрын
I really enjoy the fast-pace and the humor of your tutorials. Keeps me from zoning out. You've got a gift for making these tutorials both informative and enjoyable.
@PatrickAlphaC3 жыл бұрын
Appreciate it! I’m trying to find the right style. I get some people saying they hate it, and others love it. Guess time will tell ahah
@werthersoriginal3 жыл бұрын
@@PatrickAlphaC HA! So true. Well it is definitely different and different is refreshing! I just subscribed. Looking forward to more!
@alexman12822 күн бұрын
x2
@ubaidulkhan3 жыл бұрын
Best async explanation in the burger loving world!!!
@PatrickAlphaC3 жыл бұрын
🙏🙏🙏
@ermalgashimramori2 жыл бұрын
One of the greatest explanations of Async in KZbin.
@ahmedb861314 күн бұрын
I cant lie the creativity in explaining async is phenomenal.
@KermitDominicano3 ай бұрын
Fantastic video. I'm working on something for my internship that involves asyncio and aiohttp and this made it very easy to understand what is going on, you explain everything so well
@venkatramachandran63452 жыл бұрын
Incredible. Thank you so much. In the middle of a development that has 300,000 inevitable API calls. Let me check how it works. Again, Thank you
@PatrickAlphaC2 жыл бұрын
Good luck!
@venkatramachandran63452 жыл бұрын
@@PatrickAlphaC Processed 320k API with 100 APIs at a time. Out of 320k, 91 got connection error (404). When I rerun the remaining APIs, it worked. How to avoid this connection failure? It looks like a common issue in asyncio but dont see proper fix.
@pouyatoutounchy12382 ай бұрын
Finally, someone who explained it in a language that I know the best FOODS! Thank you for the tutorial, much love from Iran 😊😊
@kevinlao3690Ай бұрын
Dude this is the best explanation for asyncio that I've seen. I am surprised why this does not have enough views
@davidkorn52532 жыл бұрын
you have a skill for making tutorials very engaging. I didn't zone out for a sec
@PatrickAlphaC2 жыл бұрын
Yay :) Glad it was helpful!
@sleepyimsomx3544 ай бұрын
Usually i dont understand any of the programming video but this is by far the greatest explanation video ive ever watched
@vadim9212 жыл бұрын
Dude this is the most amusing programming tutorial I've seen in a while! Good stuff, you've got some acting skills
@PatrickAlphaC2 жыл бұрын
Glad it was fun and educational hehe
@vadim9212 жыл бұрын
@@PatrickAlphaC I wish you made the whole course on that stuff
@evanfonseka55203 жыл бұрын
Ayo this is the best clip I have ever witnessed about making api calls faster, props to u my man!!
@PatrickAlphaC3 жыл бұрын
Much obliged friend
@127.3 жыл бұрын
Finally understood how to implement asycio. Very well explained. You not trying to get everything correct in first attempt and giving errors so viewers can understand why it gave error was something very educational in this video. Subscribed.
@anoopisaac Жыл бұрын
really enjoyed the part where you shuttle between two pans to check if its done and in the process explaining the purpose event loop
@PatrickAlphaC Жыл бұрын
Glad that was helpful! I might make this video again...
@TheHeroIsRisingUp2 ай бұрын
Wow! I hope this legend continues to provide such useful lessons for all of us.
@bravitheja11426 ай бұрын
wonder i completed 17mins tutorial without getting distracted. Great way of keeping audience on focus :)
@lawrencedoliveiro9104 Жыл бұрын
6:12 You could turn any synchronous (i.e. thread-blocking call) into an async one using the to_thread() function available in asyncio with Python 3.9 and later.
@PatrickAlphaC Жыл бұрын
hot dog
@903vulture2 жыл бұрын
Dude, you have an amazing way for teaching things that in another way would result boring and complex. You've won a new and loyal subscriptor from Uruguay.
@PatrickAlphaC Жыл бұрын
ty fren
@asimkhan-ko6ew Жыл бұрын
Best video on aync I have ever seen. It is just like Tom cruise movie, you have to stick till end, twist may come any moment. Who knows😂
@FaizanUlHaq-mf3zt7 ай бұрын
didnt even zone out once, loving this....SUBSCRIBED
@PatrickAlphaC6 ай бұрын
Ty Fren :)
@paulovinicius58332 жыл бұрын
It`s been less than 1 min of video and I already want to subscribe to his channel. Done.
@nam45742 жыл бұрын
I really really like this tutorial!! You made it really funny and enjoyable. Never had such a fun programming tutorial on youtube :D Keep going!
@PatrickAlphaC2 жыл бұрын
Thanks for the comment!
@hypebeastuchiha92292 жыл бұрын
Who says programmers aren't funny? Great Vid!
@pavanpandya90802 ай бұрын
One of the best tutorials on Asyncio❤
@idlenoodle23853 жыл бұрын
I didnt come here looking for an amazing channel. but here we are
@PatrickAlphaC3 жыл бұрын
😍😍😍
@mattmaximo87162 жыл бұрын
this is the best tutorial i've watched on youtube. Surprisingly enjoyable for my pea brain
@PatrickAlphaC2 жыл бұрын
Glad you enjoyed fren :)
@RenormalizedAdvait2 жыл бұрын
Wow! This is revolutionary technique in teaching how to code, to be honest it is better than the best tutorials here. Keep it up.
@PatrickAlphaC2 жыл бұрын
Glad it’s fun fren :)
@kovychchat__my_Teleqram_id Жыл бұрын
For more enquiries, reach out⬆️⬆️⬆️..
@rns10 Жыл бұрын
okay you are better than chatgpt.
@Networkprofessor Жыл бұрын
This video makes me hungry and smarter at the same time.
@PatrickAlphaC Жыл бұрын
yes
@vickysharma92272 жыл бұрын
Hey Man, Thanks for the video. using Tasks is a super duper and important way
@luxeave3 жыл бұрын
this kind of guide, is life-altering. just amazing, man.
@malakggh Жыл бұрын
I had to stop the video, to like and comment on this amazing explanation.
@PatrickAlphaC Жыл бұрын
Thank you!
@AD-cw1ny2 жыл бұрын
This is the best coding tutorial ever! Before finding it i was wondering what half of these things are. Now it's all clear, just like that! Thanks!
@PatrickAlphaC2 жыл бұрын
Perfect!!
@redjinnee20082 жыл бұрын
Great video my friend, await more_videos_please
@PatrickAlphaC2 жыл бұрын
Appropriate joke !
@eugenmalatov54705 ай бұрын
Really amazing, so well explained and funny
@h8handles3 жыл бұрын
Dude please more more more where have you been my whole coding life.
@PatrickAlphaC3 жыл бұрын
I'm flattered beyond reason
@jeffreylim59202 жыл бұрын
Two things to remember when to use await. 1. You have to await to register the task to the event loop. 2. You have to await the coroutine to return the 'real response'.
@jeffreylim59202 жыл бұрын
The first job takes significant time, and this is why 11:27 method only diminished 4 seconds. (13s -> 9s) So when we do registering job all at once, it saves time and we could enjoy enormous time gain. (13s->1s)
@carterreynolds56492 жыл бұрын
@@jeffreylim5920 yea that's what he said lol...
@zmaktr Жыл бұрын
Yes we need await before get_task(session)
@vickysharma92272 жыл бұрын
For a tricker topic Very Clearly Explained. Thanks brother once again.
@carterreynolds56492 жыл бұрын
i was having a hell of a time understanding async coding and this video really helped. Thank you! Take my sub :)
@kovychchat__my_Teleqram_id Жыл бұрын
For more enquiries, reach out⬆️⬆️⬆️..
@nonesubham Жыл бұрын
literally i don't feel like i am learning ASYNC, just feel like watching any comedy show..
@PatrickAlphaC Жыл бұрын
hmm... thanks for the feedback
@nonesubham Жыл бұрын
@@PatrickAlphaC you really make asyncio easy for me thanks
@PatrickAlphaC Жыл бұрын
@@nonesubham oh ahahha
@yerielkim3272 жыл бұрын
Best teacher i've ever seen. Really impressive
@PatrickAlphaC2 жыл бұрын
Glad it was helpful!
@jamesyinbaare10 ай бұрын
The right terminology of *task is called spread instead of dereferencing. @ 15:36
@padraic19832 жыл бұрын
That was an AWESOME tutorial mate. Subscribed!
@dipankardey10442 жыл бұрын
12:19 I just ran the exact same code, it says RuntimeError: Event loop is closed. Win11,python 3.10.5
@sujalpadhiyar5731 Жыл бұрын
Patrick great job. I didn't skip even a second till end. I request you to make more interactive videos on python.
@PatrickAlphaC Жыл бұрын
Glad you enjoyed, and I can do that!
@mafirus2 жыл бұрын
I'm a full-time JS web dev, and I was wondering recently what was the python approach of Promise.all() Thank you so much, this is great content!!!
@Nikki7131003 жыл бұрын
the best tutorial on the internet, ever
@kareemmahlees35972 жыл бұрын
I watched many videos and read the docs but understandid the best from you
@PatrickAlphaC2 жыл бұрын
Glad to hear it :)
@andyhawaii2819 Жыл бұрын
As a c++ guy, I can seriously appreciate this
@peterwoo27187 ай бұрын
the video really cool and fun. and the code examples are really helpful. Thank you!
@Kaustubhingale952 Жыл бұрын
This is greatest. I bow in front of you Sir!
@billjellesma13712 жыл бұрын
Very informative. The cooking analogy was gold!
@kapilsonyt2 жыл бұрын
One of the best asyncio tutorial!! Thanks much Patrick!
@damiyagondha71535 ай бұрын
Really loved this explanation!
@froggyanaАй бұрын
Best explanation ever! Thanks!
@akashsoren13682 жыл бұрын
Really Well explained and love the cooking. Subscribed. Very Fun to watch.
@EekaMau5 Жыл бұрын
i'm so glad I found you.. Awesomeness !!
@Lorant19842 жыл бұрын
Oh Dude, I would love to see more tutorials done in this style! Super entertaining!
@lucasvazdelima44202 жыл бұрын
I can't click enough on 'like' button. Thanks, your video was amazing!
@Flyingnobull2 жыл бұрын
Great video Patrick! I wonder if you would make similar ones for threading, multi-processing and comparison of all concurrency features.
@safeer786ful3 жыл бұрын
Your channel is going to blow up. Amazing explanation, keep up the good work
@PatrickAlphaC3 жыл бұрын
“Blow up” I hope you meant ;)
@safeer786ful3 жыл бұрын
@@PatrickAlphaC ofcourse! ☺
@lawrencedoliveiro9104 Жыл бұрын
6:05 Fun fact: asyncio is written in pure Python. What was that about Python not being able to do event loops “natively”?
@PatrickAlphaC Жыл бұрын
I meant more like javascript has the event loop as a first-class citizen.
@lawrencedoliveiro9104 Жыл бұрын
@@PatrickAlphaC You mean as a built-in type? Python doesn’t have that, because it doesn’t need it. Remember that, unlike JavaScript, asyncio provides an API for wrapping alternative event loops, it doesn’t force you to use its default BaseEventLoop. For example, every GUI toolkit already provides its own event loop, and Python allows asyncio to work with that.
@rolandandrews75183 жыл бұрын
good quality video right there. Synthetic and well explained. Good job man
@PatrickAlphaC3 жыл бұрын
Appreciate it! It’s a pretty tricky topic, so glad to hear it makes sense
@ahmed-samer Жыл бұрын
Great explanation, thank you! It would be good too if you mention your learning process to grasp different topics
@PatrickAlphaC Жыл бұрын
This is a HUGE part of it kzbin.info/www/bejne/f4SYlXShe7iilbs
@anamoly012 жыл бұрын
Great video. would be even better if you could also show how to control number of parallel requests. Uncontrolled parallel requests will trigger dos attack protections and block your further requests.
@Lorant19842 жыл бұрын
No, that would be confusing, considering the topic of the tutorial. A step-by-step (keep it simple) approach is preferable.
@oakae326 Жыл бұрын
having that issue now
@i701Dev3 жыл бұрын
Oh man what a fun video. You have definitely earned a sub mate!
@PatrickAlphaC3 жыл бұрын
Thank you!
@SaishShettytgroxx3 жыл бұрын
This is exactly what I was looking for. Thankss a ton
@PatrickAlphaC3 жыл бұрын
Beautiful!
@onijadissanayaka61902 жыл бұрын
wow I leaned how to make a burger while cooking beans : )
@PatrickAlphaC2 жыл бұрын
That was the real take away
@dientu103 жыл бұрын
Well well well, to make tasks happen simultaneously, put them into an even_loop, just simple principle that i only understood after this video. The tutorial surprise my brain. Thank you!
@PatrickAlphaC3 жыл бұрын
Glad this is what helped it click!
@AR-fh2uh2 жыл бұрын
I call you on your Ordinary Sausage "ta da!" Well played
@4523452345234511 ай бұрын
Thanks for sharing ..
@spencerphill811510 ай бұрын
Great video, my only question would be is, how would you make it async if each time you made a call the url changed and there were headers involved in making the api request? Headers being content type and authentication
@PatrickAlphaC10 ай бұрын
You'd have to do a lot more conditionals in the code 😅
@sahabtariq40392 жыл бұрын
give that man a cookie.
@stro32772 жыл бұрын
your video solved my issue! thanks! highly appreciated
@PatrickAlphaC2 жыл бұрын
Let's gooo!!
@Noritoshi-r8m2 жыл бұрын
Fantastic video dude, please share more advanced tips for Python like this!!
@raghavarahulkalavala1542 Жыл бұрын
great explanation
@danielhidefjall50603 жыл бұрын
I like your energy and humor
@PatrickAlphaC3 жыл бұрын
I like you liking it
@dumisanimthethwa4279 Жыл бұрын
Wow thank you so much Patrick
@GurashishSingh1 Жыл бұрын
This was a fun one!
@김성광-q3m2 жыл бұрын
I'm trying to understand how throwing tasks in an event loop by create_task in tasks list then gather the results(17:02) differs from just executing all tasks at once by gather method(16:38). It seems that gather method not only throws tasks in an event loop but also it executes and waits to be finished(?) so only difference from the two example is that whether you registered the tasks manually by adding create_task or just get them all done by gather method? Did i get it right?
@EldorJ102 жыл бұрын
Great stuff!
@legateau53872 жыл бұрын
Came back to this when exploring MEV and monitoring the chain for certain txs. All the code I've seen uses JS and async/await so was curious on implementing it in python.
@smitjainsj2 жыл бұрын
you have nailed it !!!! keep it up.
@h00t-h00t Жыл бұрын
Amazing stuff ❤❤
@b391i2 жыл бұрын
Man this video is Amazing 👏 I learned all about asyncio module in Python because of you Thank you 🙏
@PatrickAlphaC2 жыл бұрын
Awesome!! Glad it helped
@fuad4713 жыл бұрын
amazing way of explanation with nicely chosen examples , you have a great teaching style man
@PatrickAlphaC3 жыл бұрын
Appreciate it! Hope it was helpful
@danyalt82212 жыл бұрын
The Best Video About AsyncIO I've Ever Seen! Thanks Man!
@PatrickAlphaC2 жыл бұрын
Glad to hear it!
@PrakashReddyK2 жыл бұрын
Dude , thank you for the video , you made this so easy for me to understand how asyncio works , before I could not even begin to understand this concept
@dinimueterihrhurene27722 жыл бұрын
cool I m leraning python the cooking is best analogy
@kaankosti12796 ай бұрын
This is prob the best utube channel i have ever seen till now. U might also have autism. I LOVE IT I LOVE ITTTTT
@PatrickAlphaC6 ай бұрын
LMAO
@geekydanish59902 жыл бұрын
In in the version 2 of your code you have remove the print statments for printing out the each 60 symbol and print is an i/o bound job which indeed reduces the execution time but i am sure with print statment included the execution time gonna be better that the version 1 thanks awsome job :}
@ziyiyang45502 жыл бұрын
Thank you for making this concept so straightforward!
@leoparrilha1 Жыл бұрын
Hello, how can we add rate limit in the aiohttp requests using the gather method?
@Tntpker2 жыл бұрын
Cooking example was on point lol
@PatrickAlphaC2 жыл бұрын
Glad you enjoyed
@filippomarletta78673 ай бұрын
thank you, this video has been really helpfull
@meodudu61883 жыл бұрын
love the papa franku cameo
@PatrickAlphaC3 жыл бұрын
Rip pink guy
@lawrencedoliveiro9104 Жыл бұрын
16:41 I get the feeling it only took that time to finish the gather call, that the response collection was not included because it hit an error.
@samuelh53 жыл бұрын
I think it's confusing to call * "dereference," if a person either knows or is about to learn C.
@PatrickAlphaC3 жыл бұрын
You're right, I think "unpacking" is the correct term here.
@gw032sysint92 жыл бұрын
It was started very nicely with a real time analogy but then you just moved too fast..some analogy in continuation should be given for async, await, tasks, gather, Analogy for aiohttp also should have meaning once told under what circumstances not to choose requests library