Asynchronous requests and rate limiting (HTTPX and asyncio.Semaphore)

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น • 18

  • @latentheat7995
    @latentheat7995 ปีที่แล้ว +1

    You're one of the most genuine and inspiring TH-camrs on here -- thank you for taking the time to make these videos, make them accessible enough, and engaging with nearly all comments that you get. It's wonderful! :)
    I have been trying to learn touch typing with mltype, to get better, but my fingers start hurting everytime I try to go above a certain speed. I was wondering what keyboard you use? Or would recommend? Thanks again :)

    • @mildlyoverfitted
      @mildlyoverfitted  ปีที่แล้ว +1

      Wow, thank you for such a nice comment! I really appreciate it:)
      Learning touch typing is tough - I hope you will have enough patience to stick to it. It is definitely one of the investments I made in the past that I appreciate a lot nowadays.
      Regarding the keyboard, I use Logitech MX Keys. It is decent, however, I only use it when I work at my desk (multiscreen setup). To be honest, I kind of prefer a vanilla Macbook inbuilt keyboard. I am not a fan of mechanical keyboards:)

    • @latentheat7995
      @latentheat7995 ปีที่แล้ว

      @@mildlyoverfitted Ah got it! Will check it out. Keep doing what you do - it's wonderful to see :)

  • @yuricastro522
    @yuricastro522 11 หลายเดือนก่อน +1

    Thank you so much, your example helped me to solve some problems :)

  • @krp2834
    @krp2834 ปีที่แล้ว +1

    asyncio.Queue can also be used with rate limit being the queue size

    • @aniketpurohit8613
      @aniketpurohit8613 ปีที่แล้ว

      Would love to see any implementation. :)

    • @samcomber803
      @samcomber803 ปีที่แล้ว

      Me too, this would be a great video

  • @Lithdren
    @Lithdren 11 หลายเดือนก่อน

    Is there a method you can use to rate limit by time? Im interacting with an API that limits me to no more than 20 requests a minute, and i've been struggling with a way to handle that. Right now I keep track of the time of the last call, and if I made a request within the last 3 seconds I wait till 3 seconds, then send out the next request. I have multiple API keys I can utilize, and each key has a set limit, so I cycle through them, but it feels like there must be a faster way.

    • @mildlyoverfitted
      @mildlyoverfitted  11 หลายเดือนก่อน

      One alternative solution is to use some open source package (e.g. github.com/florimondmanca/aiometer ). I don't really know much about it but maybe it can help:)

  • @lukasbazalka7582
    @lukasbazalka7582 ปีที่แล้ว

    👏👏👏

  • @leeuw6481
    @leeuw6481 8 หลายเดือนก่อน +1

    wow, this is dangerous xd

  • @Ldmp807
    @Ldmp807 10 หลายเดือนก่อน

    isn't this concurrency limit not rate limit? i.e limit per second

    • @mildlyoverfitted
      @mildlyoverfitted  10 หลายเดือนก่อน

      I think you are right:) The video title is definitely misleading. Sorry about that!

  • @andi.herlan
    @andi.herlan ปีที่แล้ว +1

    I should have found this video sooner.

  • @nehetnehet8109
    @nehetnehet8109 ปีที่แล้ว

    Nice