redis-rate-limiter
Install
pip install -U redis-rate-limiter
Use
from redis_rate_limiter.config import basic_config
from redis_rate_limiter.rate_limiter import RateLimiter
basic_config(redis_url='redis://localhost:6379/0')
@RateLimiter(10, period=1)
def greet():
print('Hello')
for _ in range(100):
greet()
# Raise RateLimitExceeded after print('Hello') 10 times
Metadata
Release files for redis-rate-limiter 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| redis-rate-limiter-0.2.0.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redis_rate_limiter-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / redis-rate-limiter-0.2.0.tar.gz
| Download URL | redis-rate-limiter-0.2.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89dbc9648881ec885b52717b0773f5638335d90623eadea4fc96261040bc6920
|
|
BLAKE2b-256 checksum How to use checksums |
4ebb793d87c8a52757072d115a423d3fc0498fb3610b2ac331cd6f6dd380c933
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.8.13 Linux/5.15.0-1019-azure
|
Release files / redis_rate_limiter-0.2.0-py3-none-any.whl
| Download URL | redis_rate_limiter-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
139a34c9743eb26a69779f87c7d94b1894319479c8b03651dbecbb93634da204
|
|
BLAKE2b-256 checksum How to use checksums |
a5f520e247fa3cd7d4a9f38d94b859a76bb505c9e1f5ff2f27368a6353e2824b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.8.13 Linux/5.15.0-1019-azure
|