tomasbasham / ratelimit

API Rate Limit Decorator
MIT License
768 stars 159 forks source link

limit decorator compatible with asyncio #26

Open evemorgen opened 6 years ago

evemorgen commented 6 years ago

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?

x4v13r64 commented 5 years ago

Any progress on this?

evemorgen commented 5 years ago

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

x4v13r64 commented 5 years ago

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.

stuaxo commented 4 years ago

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