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

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 86

  • @IndianPythonista
    @IndianPythonista  4 года назад +11

    Code: github.com/nikhilkumarsingh/async-http-requests-tut
    Multiprocessing in Python: ruclips.net/video/Ju4xkvFm07o/видео.html
    Multithreading in Python: ruclips.net/video/ZPM8TCz5cd8/видео.html
    Concurrent Programming in Python (asyncio): ruclips.net/video/y85G7GLYhYA/видео.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

  • @praisedavid1653
    @praisedavid1653 3 года назад +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.

  • @gregorybutcher2647
    @gregorybutcher2647 3 года назад +6

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

  • @d7q0hdjfq39h
    @d7q0hdjfq39h 4 года назад +2

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

  • @Millez
    @Millez Год назад +7

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

  • @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.

  • @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.

  • @shokhrukhabduahadov3985
    @shokhrukhabduahadov3985 3 года назад +13

    would be better if u put bookmarks to the video parts

  • @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

  • @krishjodu3767
    @krishjodu3767 2 года назад

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

  • @Kamehamehax21
    @Kamehamehax21 4 месяца назад

    Thank you for this video. Nice explanation.

  • @ncjatin
    @ncjatin 2 года назад

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

  • @vishalwaghmare3130
    @vishalwaghmare3130 2 года назад

    Best video on this topic

  • @eduardogil1775
    @eduardogil1775 3 года назад

    Excellent explanation, Thanks for sharing! 👍🏼

  • @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 ?

  • @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?

  • @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?

  • @rajii515
    @rajii515 Год назад

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

  • @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

  • @bhola8023
    @bhola8023 Год назад

    Which OS u are using and what's that theam

  • @mahdisecurity1700
    @mahdisecurity1700 3 года назад

    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

  • @mashoodurrehman9840
    @mashoodurrehman9840 4 года назад +2

    Awesome.... keep making stuff like that.

  • @Василий-й1у
    @Василий-й1у 2 года назад

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

  • @TheJBardopoulos
    @TheJBardopoulos 3 года назад

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

  • @techqsr
    @techqsr Год назад

    Informative 😍

  • @yt-1161
    @yt-1161 2 года назад

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

  • @m.alaiady3627
    @m.alaiady3627 3 года назад

    Nice explanation

  • @samirbhattarai3441
    @samirbhattarai3441 4 года назад

    Nicely demonstrated. Great.👏

  • @drissaitkassimusic
    @drissaitkassimusic 3 года назад

    Best video to understand this tipic

  • @adnankaya
    @adnankaya 2 года назад

    Great tutorial! Thanks for sharing.

  • @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.

  • @kiyotaka627
    @kiyotaka627 4 года назад

    thank you for this well designed video, very informative.

  • @PGhai
    @PGhai 3 года назад +1

    Nikhil Bhai, do u also teach one on one?

  • @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?

  • @akhil3365
    @akhil3365 3 года назад

    what is the difference between qrequests and asyncio

  • @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.

  • @SurendraTarai
    @SurendraTarai 3 года назад

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

  • @josephomondi629
    @josephomondi629 3 месяца назад

    great video buddy

  • @googlemonkey7746
    @googlemonkey7746 4 года назад

    Nice explained

  • @bhaveshmevada8424
    @bhaveshmevada8424 3 года назад

    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

  • @arjunchatterjee5667
    @arjunchatterjee5667 2 года назад

    superb video!

  • @_sharmaji.dev_
    @_sharmaji.dev_ 3 года назад

    AWESOME!!!! REALLY HELPED.

  • @AngelGonzalez-kl8oi
    @AngelGonzalez-kl8oi 2 года назад

    Great!

  • @poojagautam1406
    @poojagautam1406 3 года назад

    Amazing tutorial! Thanks a lot.

  • @deepanshuchoudhary4598
    @deepanshuchoudhary4598 2 года назад

    God bless you

  • @sulaymanali8080
    @sulaymanali8080 3 года назад

    really great. thanks a lot

  • @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 ?

  • @hgt3
    @hgt3 Год назад

    thank you

  • @EnglishRain
    @EnglishRain 4 года назад

    Brilliant video, thanks a lot!

  • @yellie5629
    @yellie5629 3 года назад

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

  • @nelsonkenmochi9353
    @nelsonkenmochi9353 3 года назад

    Nice video, thanks for that. :)

  • @Duychienvt
    @Duychienvt Год назад

    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: ruclips.net/video/ecKWiaHCEKs/видео.html

  • @veereshgs5298
    @veereshgs5298 3 года назад

    Great 👍

  • @lazypunk794
    @lazypunk794 3 года назад

    Great job mate

  • @mithunnambiar1433
    @mithunnambiar1433 4 года назад

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

  • @peterchao7429
    @peterchao7429 2 года назад

    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?

  • @FRUXT
    @FRUXT Год назад

    Why no subtitles ?

  • @abhisekkeshari4850
    @abhisekkeshari4850 Год назад

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

  • @YuvrajSingh-pz7wt
    @YuvrajSingh-pz7wt 4 года назад

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

  • @dm-vh9yu
    @dm-vh9yu 4 года назад

    Great video, keep it up

  • @trickdigger5744
    @trickdigger5744 4 года назад

    Sir, Kindly check the pull request made on github.

  • @ashishsondagar2812
    @ashishsondagar2812 3 года назад

    15:25 asyncio

  • @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.

  • @radiozamindar4710
    @radiozamindar4710 3 года назад

    hello bro can i have some help ?

  • @switchblade3868
    @switchblade3868 3 года назад

    Ahats that linux???

  • @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

  • @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.

  • @michelromero7671
    @michelromero7671 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)

  • @Picker22
    @Picker22 4 года назад +1

    dint understand all this sorry

  • @ahmetsakin8573
    @ahmetsakin8573 Год назад

    thank you