ratelimit icon indicating copy to clipboard operation
ratelimit copied to clipboard

limit decorator compatible with asyncio

Open evemorgen opened this issue 6 years ago • 4 comments

Hi, I find this module very useful and promising - however more and more of my code is getting asyncio based. Wouldn't it be nice if limit decorator could be asyncio compliant?

It seems like aio-limit would be essentially the same as limit with couple of async and await in it. I'm willing to make a PR for that. Would you guys consider merging such thing?

evemorgen avatar Oct 29 '18 15:10 evemorgen

Any progress on this?

x4v13r64 avatar Aug 13 '19 17:08 x4v13r64

@j4v thanks for pinging me on this one. I've made a PR for this #35 - please have a look 😃 However, I'm not sure whether it's going to be merged (and when if so) due to not being python 2.7 compatible. I'd love to hear maintainers opinion about it!

evemorgen avatar Aug 15 '19 22:08 evemorgen

Thanks @evemorgen - looks good. We've implemented this (for now) with https://github.com/hallazzang/asyncio-throttle and it works, but as the library isn't supported we'd rather move to a more mature project as https://github.com/tomasbasham/ratelimit.

x4v13r64 avatar Aug 16 '19 08:08 x4v13r64

@tomasbasham would it be possible to merge this, now that python 2.7 is unsupported ?

stuaxo avatar Feb 21 '20 14:02 stuaxo