Sliding rate limiter using memory or a distributed Redis backend.
- Free software: Apache Software License 2.0
- Documentation: https://sliding-rate-limiter.readthedocs.io.
- Pluggable rate limiting backend (threadsafe in-memory or distributed Redis backend)
from sliding_rate_limiter.region import RateLimiterRegion
from sliding_rate_limiter.backends.memory import MemoryBackend
region = RateLimiterRegion('default')
region.configure(MemoryBackend())
@region.rate_limit_on_arguments()
def foo(user_id):
pass
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
API heavily inspired by dogpile.cache