Making multiple HTTP requests using Python (synchronous, multiprocessing, multithreading, asyncio)

Поділитися
Вставка
  • Опубліковано 22 гру 2024

КОМЕНТАРІ • 85

  • @IndianPythonista
    @IndianPythonista  4 роки тому +11

    Code: github.com/nikhilkumarsingh/async-http-requests-tut
    Multiprocessing in Python: ua-cam.com/video/Ju4xkvFm07o/v-deo.html
    Multithreading in Python: ua-cam.com/video/ZPM8TCz5cd8/v-deo.html
    Concurrent Programming in Python (asyncio): ua-cam.com/video/y85G7GLYhYA/v-deo.html

    • @ibrahimaba8966
      @ibrahimaba8966 3 роки тому

      .. can we use multiprocessing and multithreading at the same time ? I mean having n processes and m thread per process.

    • @savantofillusions
      @savantofillusions 2 роки тому

      Your snake art got me to stay

  • @Millez
    @Millez Рік тому +7

    0:59 Synchronous
    4:23 Multiprocessing
    7:43 Multithreading
    15:23 AsyncIO

  • @praisedavid1653
    @praisedavid1653 4 роки тому +7

    This is the most informative video I have seen on these features/modules. Kudos

  • @zameerahmed1775
    @zameerahmed1775 2 роки тому

    Ur too good .............. youthful & motivating voice. Above all ur python concepts are up to the mark.

  • @shokhrukhabduahadov3985
    @shokhrukhabduahadov3985 4 роки тому +13

    would be better if u put bookmarks to the video parts

  • @d7q0hdjfq39h
    @d7q0hdjfq39h 4 роки тому +2

    You explain pretty well sir.... Learning Python from you is such a honour for me.

  • @learnerb3403
    @learnerb3403 2 роки тому

    Incredible video sir with clarity in presentation and in depth knowledge. Thanks for sharing your knowledge. Looking forward for more such real time example videos.

  • @krishjodu3767
    @krishjodu3767 2 роки тому

    Thanks for your wonderful video bro, It's raising AssertionError at timer

  • @yt-1161
    @yt-1161 2 роки тому

    @13:46 what are the downsides of having too many max_workers ?

  • @vishalwaghmare3130
    @vishalwaghmare3130 2 роки тому

    Best video on this topic

  • @bufmouse13
    @bufmouse13 2 роки тому +1

    Incredible video, thank you! Im trying to find ways to turn three scripts that run a AI art generating bot into one and I think some of your examples is really going to help.

  • @Kamehamehax21
    @Kamehamehax21 6 місяців тому

    Thank you for this video. Nice explanation.

  • @gregorybutcher2647
    @gregorybutcher2647 4 роки тому +6

    Awesome video! Just one question:
    Do take different amount of processing power? if so which is more efficient, multithreading or asynio?

  • @m1ch3lr0m3r0
    @m1ch3lr0m3r0 3 роки тому

    Thanks for this video, I didn't actually watched it because of the great thumbnail that told me what I came looking for. (I left a like tho)

  • @mashoodurrehman9840
    @mashoodurrehman9840 4 роки тому +2

    Awesome.... keep making stuff like that.

  • @rajii515
    @rajii515 Рік тому

    Thankyou for this video by the way.. it helps me a lot 👍👍

  • @eduardogil1775
    @eduardogil1775 3 роки тому

    Excellent explanation, Thanks for sharing! 👍🏼

  • @sudhakarpandey693
    @sudhakarpandey693 3 роки тому

    If someone explaining so nicely then plz don't mark 👎...if he is missing something then tell him personally.... don't make his moral down...I found his vedio perfect 👍thanks frnd

  • @samirbhattarai3441
    @samirbhattarai3441 4 роки тому

    Nicely demonstrated. Great.👏

  • @ncjatin
    @ncjatin 2 роки тому

    I have a question...
    Example in synchronous code.... We are only defining methods not calling it... Than also methods are running

  • @techqsr
    @techqsr Рік тому

    Informative 😍

  • @Berkeozbeek
    @Berkeozbeek 2 роки тому

    Could you please tell me how I can return the data printed from fetch() function in multithreadding? Whenever I tried to return it, t always gives me None for some reason but I can print it without any problem.

  • @akhil3365
    @akhil3365 3 роки тому

    what is the difference between qrequests and asyncio

  • @JamalanJuda
    @JamalanJuda 2 роки тому

    What if I have a list of different URLs that I want to do GET from? How can I apply multithreading in that scenario?

  • @_sharmaji.dev_
    @_sharmaji.dev_ 4 роки тому

    AWESOME!!!! REALLY HELPED.

  • @getconsiousstate
    @getconsiousstate 3 роки тому

    Any reason why ProcessPoolExecuter is not used for multiprocessing ? and what about multiprocessing.pool.ThreadPool ? Any Idea why these many modules are created for same functionality in Python ?

  • @bhola8023
    @bhola8023 Рік тому

    Which OS u are using and what's that theam

  • @vsanjairaj
    @vsanjairaj 3 роки тому

    I have to get status codes for 150k urls in a data frame. I want a new columns 'status' in the df and i want the response code of the request of url. What's the best way to do it?

  • @SurendraTarai
    @SurendraTarai 3 роки тому

    you are awesome, well explained... appreciate it. keep it up

  • @maba7097
    @maba7097 Рік тому

    Thank you for the video
    I have an app that I integrated with api. I send a message to it and it analyzes it and then returns a result t, but when I send many messages at the same time, it does not go well and you get a mess
    In my case, what solves my problem from what you mentioned?

  • @TheJBardopoulos
    @TheJBardopoulos 3 роки тому

    and what's the limit for max-workers (depends on my PC, I know, but how to find the limit?)

  • @josephomondi629
    @josephomondi629 5 місяців тому

    great video buddy

  • @drissaitkassimusic
    @drissaitkassimusic 3 роки тому

    Best video to understand this tipic

  • @bhaveshmevada8424
    @bhaveshmevada8424 4 роки тому

    Bro i want to post json data with requests.post method and i did it but it takes very long time to send all data...plz help me

  • @KirillBezzubkine
    @KirillBezzubkine 2 роки тому +1

    The video is good. BUT: how would you make 10000 http requests when the api supports about 50 requests only at a time (otherwise it throws 429 error)? I need help with that. Thank you

  • @kiyotaka627
    @kiyotaka627 4 роки тому

    thank you for this well designed video, very informative.

  • @adnankaya
    @adnankaya 3 роки тому

    Great tutorial! Thanks for sharing.

  • @kirtimali723
    @kirtimali723 2 роки тому

    my main function is not calling... can you help me with it?

    • @ncjatin
      @ncjatin 2 роки тому

      Just cross-check.. have you out @timer(1,1) before main function ?

  • @arjunchatterjee5667
    @arjunchatterjee5667 2 роки тому

    superb video!

  • @FRUXT
    @FRUXT 2 роки тому

    Why no subtitles ?

  • @nelsonkenmochi9353
    @nelsonkenmochi9353 4 роки тому

    Nice video, thanks for that. :)

  • @poojagautam1406
    @poojagautam1406 3 роки тому

    Amazing tutorial! Thanks a lot.

  • @mithunnambiar1433
    @mithunnambiar1433 4 роки тому

    An assertion error is stopping me from the synchronous method. does anyone experienced the same problem?

  • @lazypunk794
    @lazypunk794 4 роки тому

    Great job mate

  • @AngelGonzalez-kl8oi
    @AngelGonzalez-kl8oi 2 роки тому

    Great!

  • @ashishsondagar2812
    @ashishsondagar2812 3 роки тому

    15:25 asyncio

  • @PGhai
    @PGhai 4 роки тому +1

    Nikhil Bhai, do u also teach one on one?

  • @m.alaiady3627
    @m.alaiady3627 3 роки тому

    Nice explanation

  • @TanviAravind
    @TanviAravind 4 роки тому

    Thanks for making this video of Asyncio hope it covers web scrapping

    • @TanviAravind
      @TanviAravind 4 роки тому +1

      I had finished python asyn await and aiohttp during the weekend... earlier it used to take 40 to 50 mins to scrap the data after aiohttp and Asyncio implementation it's just 90 Seconds

    • @d7q0hdjfq39h
      @d7q0hdjfq39h 4 роки тому

      @@TanviAravind yea it's such a time saving during projects.

  • @EnglishRain
    @EnglishRain 4 роки тому

    Brilliant video, thanks a lot!

  • @Василий-й1у
    @Василий-й1у 3 роки тому

    этому типу надо памятник поставить( в хорошем смысле :) )

  • @sulaymanali8080
    @sulaymanali8080 4 роки тому

    really great. thanks a lot

  • @radiozamindar4710
    @radiozamindar4710 3 роки тому

    hello bro can i have some help ?

  • @abhisekkeshari4850
    @abhisekkeshari4850 Рік тому

    Could you please add the timestamp of the methods that would be a great help

  • @deepanshuchoudhary4598
    @deepanshuchoudhary4598 2 роки тому

    God bless you

  • @veereshgs5298
    @veereshgs5298 3 роки тому

    Great 👍

  • @dm-vh9yu
    @dm-vh9yu 4 роки тому

    Great video, keep it up

  • @trickdigger5744
    @trickdigger5744 4 роки тому

    Sir, Kindly check the pull request made on github.

  • @mahdisecurity1700
    @mahdisecurity1700 4 роки тому

    hi
    your video is very good subject. but for later video please :
    multiple function multiple sync
    multiple function multiple async
    multiple function multiple threading
    multiple function multiple processing
    and
    combine all concepts with simple language .
    thank you very much .
    god willing

  • @googlemonkey7746
    @googlemonkey7746 4 роки тому

    Nice explained

  • @switchblade3868
    @switchblade3868 3 роки тому

    Ahats that linux???

  • @hgt3
    @hgt3 Рік тому

    thank you

  • @YuvrajSingh-pz7wt
    @YuvrajSingh-pz7wt 4 роки тому

    Can u plzzz makr video on topic of what is channel in django and make chatting app ..plz sir

  • @yellie5629
    @yellie5629 4 роки тому

    Can I organize and post your lecture on my blog, Medium? I will leave a reference.

  • @MythologyMystics
    @MythologyMystics 4 роки тому

    Sir, can you let me know how to integrate asyncio to call multiple cameras to take a multiple angle picture once at a time.like using picamera over raspberry Pi. Thank you

    • @MrPedala94
      @MrPedala94 4 роки тому

      sounds to me like you can just do that in a sequential manner.

  • @kumarnitish6552
    @kumarnitish6552 3 роки тому

    Are you sure of the time calculation using a timer, because it seems like coding is taking more than what it prints in the console? Your timer logic is not correct

  • @Duychienvt
    @Duychienvt 2 роки тому

    I think threadings are running inside one process. It is impossible to do faster than multil-processing.
    The reasons that your multithreading is faster : may be this is running multithreading inside multiprocessing
    Check out this video: ua-cam.com/video/ecKWiaHCEKs/v-deo.html

  • @peterchao7429
    @peterchao7429 3 роки тому

    Great video, I have learned a lot here. One question I have is, instead of get HTTP request, what if I want to do post request?

  • @nirakarpadhy
    @nirakarpadhy 3 роки тому +1

    !!! PETITION for making tutorials using examples of "POST" requests !!!
    @IndianPythonista
    Why does every tutorial and blog post always assume we only only need "get" requests?
    I try to implement the same code for "post" requests and I run into all sorts of errors.
    I wish you or someone on this earth for once did tutorials for fast http post requests.

  • @Picker22
    @Picker22 4 роки тому +1

    dint understand all this sorry