AsyncIO, await, and async - Concurrency in Python

2023 ж. 5 Қар.
64 937 Рет қаралды

𝙎𝙞𝙜𝙣 𝙪𝙥 𝙛𝙤𝙧 𝙎𝙤𝙘𝙧𝙖𝙩𝙞𝙘𝙖 𝘾𝙤𝙪𝙧𝙨𝙚𝙨: www.socratica.com/collections
𝙎𝙤𝙘𝙧𝙖𝙩𝙞𝙘𝙖 𝙋𝙮𝙩𝙝𝙤𝙣 𝙨𝙝𝙞𝙧𝙩: shop.socratica.com/products/p...
The asyncio module in Python helps you use concurrency in your code. In this lesson, you'll learn about subroutines & coroutines, concurrency vs. parallelism, and how to use the async/await keywords to create a coroutine, and to run a batch of coroutines using convenience functions in the asyncio module.
𝙋𝙧𝙤𝙜𝙧𝙖𝙢𝙢𝙞𝙣𝙜 𝙥𝙡𝙖𝙮𝙡𝙞𝙨𝙩𝙨:
Python: bit.ly/PythonSocratica
SQL: bit.ly/SQL_Socratica
Subscribe to Socratica + bell for notifications:
bit.ly/SocraticaSubscribe
⧓⧓⧓⧓⧓
We recommend:
How to Be a Great Student
ebook: amzn.to/2Lh3XSP
Paperback: amzn.to/3t5jeH3
Kindle Unlimited (read free): amzn.to/3atr8TJ
Python Cookbook, 3rd edition
amzn.to/3jprjX2
More Socratica Python goodies here:
shop.socratica.com/collection...
⧓⧓⧓⧓⧓
Join this channel to get access to perks:
/ @socratica
Support Socratica on Patreon:
/ socratica
Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Michael Harrison
Edited by Megi Shuke and Michael Harrison
#python #asyncio #concurrency

Пікірлер
  • Wow -- the quality of the production, and the level of pedagogy, are both superb.

    @MrMilesfinn@MrMilesfinn4 ай бұрын
    • And the level of absurdly funny turns 😂❤

      @mkamp@mkampАй бұрын
    • insane

      @mosk53@mosk539 күн бұрын
  • Almost 10 years later, and she hasn't aged a bit. I had realized from the beginning that she wasn't human. 😍 Kindly don't leave us without new episodes. This may not be a series we deserve, but it is a series we definitely need.

    @MariosMartiopoulos@MariosMartiopoulos5 ай бұрын
    • wait ... isn't she a human ?

      @abdessamadao1973@abdessamadao19735 ай бұрын
    • @@abdessamadao1973 no, she is superhuman.

      @MariosMartiopoulos@MariosMartiopoulos5 ай бұрын
    • Actually, she is real. Her name is Ulka Simone Mohanty.

      @robertmanigault625@robertmanigault6255 ай бұрын
    • @@robertmanigault625 well, thank you Captain Obvious, now we have two superhumans in this channel. (No offense, just kidding. 🤭)

      @MariosMartiopoulos@MariosMartiopoulos5 ай бұрын
    • @@robertmanigault625 Wow , I didn't know she can program as well

      @abdessamadao1973@abdessamadao19735 ай бұрын
  • Code examples were very clear, and the explanation of coroutines I think is sometimes glossed over in other tutorials. A similar explanation of multithreading, and the use of thread pools, may be an idea for a future video. Communication between threads and thread debugging can be very tricky.

    @mr.bulldops7692@mr.bulldops76926 ай бұрын
    • "Communication between threads and thread debugging can be very tricky" - that, my friend, is the understatement of the century! :)

      @jackaubrey8614@jackaubrey86145 ай бұрын
  • After maining Symmetra for years, I could listen to these videos all day long.

    @crimsomnia1415@crimsomnia14153 ай бұрын
  • For those who enjoy etymology, "sub" and "co" are common latin prefixes that mean "under", "beneath" (subconscious, submarine etc) and "with" (colaborate, correlation etc). At least this is how I remember which one is which. I hope this is useful to someone else. :)

    @feldinho@feldinho5 ай бұрын
    • "Those who don't know the difference between 'entomology' and 'etymology' bug me in ways I can't put into words."

      @Neamerjell@Neamerjell5 ай бұрын
  • This is the short and best video that explained concurrency very well made.

    @Mohammad2525@Mohammad25254 ай бұрын
  • Our team uses this module and other async libraries. Glad to see you post. The real power comes in using an async wrapper class for each io operation.

    @padraic1983@padraic19835 ай бұрын
  • My favorite python series. It's been a while! Glad you're back.

    @ChadDoebelin@ChadDoebelin5 ай бұрын
  • landed here to learn about await and async and this was the video that held my interest. Loved the lighthearted vibe and silly dry humor throughout what was also an incredibly helpful video. Thank you and good job.

    @LawrenceMorrisson@LawrenceMorrisson5 ай бұрын
  • I love the way it's presented, it's so refreshingly different from the many boring courses. love you 🥰

    @kmqwewq@kmqwewq5 ай бұрын
  • After watching several tutorials about async, This is the only one make me understand.

    @a.joshatt7518@a.joshatt75182 ай бұрын
  • Wow! This will help save some money with shorter aws lambda runtimes. Thank you!

    @Chuukwudi@ChuukwudiАй бұрын
  • Was just needing this and my fav python creators delivered!! Thank you! 💚

    @steveq34@steveq345 ай бұрын
  • Welcome back! good to see a video from you after a long time

    @devworks8787@devworks87876 ай бұрын
  • Trying to understand this topic for some time now. Absolutely clear finally ty!

    @carlosrivadulla8903@carlosrivadulla89035 ай бұрын
  • Excellent as ever, well done Socratica!

    @garyr1639@garyr16394 ай бұрын
  • Absolutely LOVE the style here. Beside being super clear and concise it’s funny as well. Well done. Looking up the courses!

    @robboerman9378@robboerman937829 күн бұрын
  • I Love how you explained it... so understandable, you made it easy for me to understand Best AsyncIO, await, and async tutorial out there

    @awuyadaniel8982@awuyadaniel89823 ай бұрын
  • Thanks for coming back my best teacher 🎉🎉🎉

    @MrPioneer7@MrPioneer76 ай бұрын
  • Thanks for the excellent video, great examples and easy to follow

    @sly2097@sly20975 ай бұрын
  • Thank you very much. After spending a decade on this finally I am able to grasp the whole async await thing.

    @Rafi-nc3nw@Rafi-nc3nwАй бұрын
  • Incredible video. Such comprehensive concept explained very cleanly

    @lenko_me@lenko_me25 күн бұрын
  • Awesome video as usual - fun and useful!

    @BillAugersdca@BillAugersdca5 ай бұрын
  • I'm certain this is the most interesting, helpful, and funny asyncio video I've seen, so far. Insta-subscribe.

    @johnneiberger7311@johnneiberger73113 күн бұрын
  • Even with all the puns and cutesy, this short video did more to help me get my head around how to actually implement async than all the others I have watched put together. So many of them spend most of their time explaining *why* to use it and end up glossing over *how*. This one gave enough why to make sense, and actually made the how understandable. Good job.

    @brianterry8512@brianterry85122 ай бұрын
  • Outstanding quality.. both in the visual production as well as the narrative.

    @omara2248@omara2248Ай бұрын
  • The legend is back. The most impressive way to teach

    @TevfikBagcivan@TevfikBagcivan5 ай бұрын
  • thank you madam, Glad you're back.

    @arkadipbasu@arkadipbasu5 ай бұрын
  • Brilliant video ! Bravo !!

    @soyuzssr@soyuzssr5 ай бұрын
  • this is gold, thank you so much

    @sahil5124@sahil51245 ай бұрын
  • Amazing approach and explanation.

    @moura3071@moura30712 ай бұрын
  • Learnt something new, thank you!

    @Reep21@Reep216 ай бұрын
  • Big shout out to Ulka Simone Mohanty.. she's the actress and really fantastic at these videos.

    @Allen-by6ci@Allen-by6ci6 ай бұрын
    • She also has a degree in computer science.

      @MariosMartiopoulos@MariosMartiopoulos5 ай бұрын
  • Tnx ! amazing as always.

    @wouteranthierens@wouteranthierens6 ай бұрын
  • Best video for asynchronous programming

    @tarannumx@tarannumx14 күн бұрын
  • Thanks to you so much. You won a subscriber.

    @isragaytanmistico@isragaytanmistico3 ай бұрын
  • Bravoo ! Nice explanation

    @voltexripper8367@voltexripper83675 ай бұрын
  • This was amazing! Thank you!

    @patriotir@patriotir18 сағат бұрын
  • I like this💚💚...you explained it all

    @mlindatech@mlindatech2 ай бұрын
  • This is actually so good

    @DavidBooth-mn3ji@DavidBooth-mn3jiАй бұрын
  • This was fantastic, thank you

    @ericstevens653@ericstevens653Ай бұрын
  • Great video, as usual :)

    @EschinTenebrous@EschinTenebrous5 ай бұрын
  • I love this girl returned!!

    @moibe182@moibe1825 ай бұрын
  • Hii, I love your videos. Can you please add videos on multithreading and multprocessing? That would be really helpful.

    @ravi4522@ravi45224 ай бұрын
  • OMG! That joke at the beginning was delicious. Ganymede, Callisto, Io and Europa.

    @humanrightsadvocate@humanrightsadvocate6 ай бұрын
  • Nice tutorial...

    @rahulkmail@rahulkmail4 ай бұрын
  • Awesome!♥

    @alinaderiparizi7193@alinaderiparizi719322 күн бұрын
  • Awesome explanation!

    @ryanprasad2090@ryanprasad20902 ай бұрын
    • Thank you so much for your kind support!! 💜🦉

      @Socratica@Socratica2 ай бұрын
  • Amazing video!

    @friesmaker@friesmaker6 күн бұрын
  • This is awesome and deserves a millions of likes

    @Smarandii@Smarandii2 ай бұрын
  • Nice, that she is back

    @user-lf5xu4tc1u@user-lf5xu4tc1u5 ай бұрын
  • The humor of this video is so corny, but I'll take it any day of the week over listening to another disembodied voice drone over top of a 2160p screen capture of an IDE where they don't even open a document for the first 3 minutes. Very clear and engaging explanation, subscribed.

    @hibryd7481@hibryd74813 ай бұрын
  • This will be very helpful for my son who's interested in programming

    @kirbymarchbarcena@kirbymarchbarcena5 ай бұрын
    • Wonderful! The family that codes together learns loads together! 💜🦉

      @Socratica@Socratica5 ай бұрын
  • heavily underrated video

    @MrCytrus@MrCytrus3 ай бұрын
  • She's back!!!!!🕺💃🕺💃🕺💃

    @jamesraphael8473@jamesraphael84735 ай бұрын
  • very informative videoa

    @SuperAppmaker@SuperAppmakerАй бұрын
  • Who writes the text of these videos? Genius.

    @Tiago_R_Ribeiro@Tiago_R_Ribeiro2 ай бұрын
  • She's back

    @bicycleninja1685@bicycleninja16855 ай бұрын
  • Thank you GLaDOS sister

    @milton8903@milton890318 күн бұрын
  • 👏 👏

    @setudutta3905@setudutta39055 ай бұрын
  • Welcome back Funny Robot! 🤖

    @TheWyrdSmythe@TheWyrdSmytheАй бұрын
  • Crazy production and the joke of AI doing mischievous axtivities was extraordinary fr.

    @greatad2405@greatad24053 ай бұрын
  • That async-IO joke.... hit hard

    @oldschoolsoldier1634@oldschoolsoldier1634Ай бұрын
  • nice

    @Lenjiy@Lenjiy5 ай бұрын
  • Hello, Would you please one one python multiprocessing. Thanks for this one

    @user-ed8ey6gh1u@user-ed8ey6gh1u4 ай бұрын
  • thanks Spock

    @redthunder6183@redthunder61834 ай бұрын
    • 🖖

      @Socratica@Socratica4 ай бұрын
  • While I'm sure this pattern is very useful, it has some severe limits. As described here, you have to wait for *all* the concurrent tasks to get done. There are cases where you want to dispatch several threads, at different times, and as *each one* gets done, do something with the result.

    @jursamaj@jursamaj5 ай бұрын
    • What language mechanism is used then in your example? Another technique?

      @Mrme-cn9je@Mrme-cn9je5 ай бұрын
  • seggestion Socratica: how can i build my own python library or package ?

    @meguellatiyounes8659@meguellatiyounes8659Ай бұрын
  • Wow!! Just Wow!! What an amazing explanation

    @bhargavsangani2901@bhargavsangani29012 ай бұрын
  • I just realised I keep watching these for the humour. I don't even like python. 😁

    @iamjimgroth@iamjimgroth6 ай бұрын
  • Why can't all tutorials be like this?

    @stephensalmon3148@stephensalmon31486 ай бұрын
  • In which version of python asyncio is introduced?

    @digvijaysinghrajput8092@digvijaysinghrajput80925 ай бұрын
    • 3.4?

      @senr4in@senr4in5 ай бұрын
    • 3.5

      @MannuJadhav@MannuJadhav5 ай бұрын
  • I am thinking about the future. Several of them, in fact. All of them concurrent.

    @alexandrupavilcu@alexandrupavilcu5 ай бұрын
  • Hey Teacher how about a payment courses Thanks a lot🙏 2:32

    @corneillembay8893@corneillembay88935 ай бұрын
  • God I love this woman

    @richmondkoomson3403@richmondkoomson34034 ай бұрын
  • The return of eveyone's favourite AI dominatrix

    @bdcash@bdcash6 ай бұрын
  • Tried but doesn't work, it took the same time

    @triggeracc6001@triggeracc60012 ай бұрын
  • 3:27 lmao

    @i_like_pengwinz1065@i_like_pengwinz1065Ай бұрын
  • Sheldon Cooper vibes

    @Imthemaddie@ImthemaddieАй бұрын
  • inhale, widen your eyes and run

    @shrutish@shrutishАй бұрын
  • are you an Ai teaching robo? :D

    @lightninglemma@lightninglemma5 ай бұрын
  • hmmm..... code is not pythonic (no snack case convention followed in function name) [OUCH!!] 👻 but good explanation though 🤓

    @papunmohanty2291@papunmohanty22915 ай бұрын
  • My 10 year old clothes neither look so good nor fit so well any more.

    @bartuslongus@bartuslongus25 күн бұрын
  • i can't help but think this is a deepfake 🤷‍♂ she was gone for so long now she's back? naaah

    @mathewmcfool@mathewmcfool5 ай бұрын
  • No link for code?

    @Anjinink@Anjinink6 ай бұрын
KZhead