Support subsecond intervals and fraction rates #206
Replies: 3 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
Is the built in |
Beta Was this translation helpful? Give feedback.
-
Yes, this is the path I went down eventually, using the build in Memory Storage to create a mock and mocking out redis at the same. time. |
Beta Was this translation helpful? Give feedback.
-
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 😸
Beta Was this translation helpful? Give feedback.
All reactions