else/Ratelimiter
Ethan Dalool 98667e75f3 else
2016-10-21 20:47:08 -07:00
..
ratelimiter-0.0.1.zip else 2016-10-21 20:47:08 -07:00
ratelimiter.py else 2016-09-05 16:37:07 -07:00
README.md else 2016-05-21 12:51:36 -07:00

Ratelimiter

Provides a Ratelimiter class to regulate timing. Create an instance with the appropriate allowance and timing rules, then just call limiter.limit() in your loop.

Note that allowance=10, period=10 is not the same as allowance=1, period=1. The first allows for more "burstiness" because all 10 operations can happen in the first second, as long as you wait for the other 9.