Closed petroslamb closed 8 months ago
First, great job in what I wish to become the needed defacto in python rate limiting.
Thank you, I'm glad it's been useful!
The subsecond interval feature is very interesting to me - however the main blocker towards implementing this is that redis (and the toy in memory storage) is (afaik) the only storage that will support it which makes it difficult to generalize.
A helpful redis mock storage, based on the memory storage, could make it night and day for ones unittests 😸
Is the built in MemoryStorage
not usable for this purpose?
First, great job in what I wish to become the needed defacto in python rate limiting.
My feature request is for sub second intervals, for example
1 request per 500 milliseconds
and/or fractions of rates as well, like0.5 requests per second
. Possibly by lowering the base time unit to 1 millisecond from 1 second that appears to be now.Do you think this is possible?
P.S. I am using the redis backend and i suspect when i try to mock Redis out with FakeRedis the custom running Lua scripts will raise an error. A helpful redis mock storage, based on the memory storage, could make it night and day for ones unittests 😸