Sliding rate limiter using memory or a distributed Redis backend.
Project description
sliding-rate-limiter
Sliding rate limiter using memory or a distributed Redis backend.
Free software: Apache Software License 2.0
Documentation: https://sliding-rate-limiter.readthedocs.io.
Features
Pluggable rate limiting backend (threadsafe in-memory or distributed Redis backend)
Usage
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
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
API heavily inspired by dogpile.cache
History
0.1.0 (2018-05-10)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sliding_rate_limiter-2.1.0.tar.gz
.
File metadata
- Download URL: sliding_rate_limiter-2.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a29035d1e3f6f578b7294faddaafeef107dc3e7f0103e80fcffa380f95f772cd |
|
MD5 | 356c4a9012142218bb7f85527dcdac7f |
|
BLAKE2b-256 | 58747076880cc78a6ea78849d7307a44efbe21a164970740ed9a53eca2dc1ed7 |
File details
Details for the file sliding_rate_limiter-2.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: sliding_rate_limiter-2.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0d502ed56a7abaefe86c689e0cf33def104d9f0d611b46cebf61eb1222e1dc8 |
|
MD5 | feb576ba2981bd161e9b595b2bf83be3 |
|
BLAKE2b-256 | 63f88db56e6ff4e55be2243d03eb89cc7de3ccbfdbeaabec70c81f02bd30a2c1 |