Provides asyncio storage and strategy implementations for the limits library.
Project description
alimits
Provides asyncio-compatible implementations of the limits library storage and strategy options.
Used in the slowapi library.
Documentation is available here.
Available on PyPi at alimits.
Strategies
This library implements a couple asyncio limiting strategies:
- Fixed window → (
alimits.strategies.AsyncFixedWindowRateLimiter) - Moving window → (
alimits.strategies.AsyncMovingWindowRateLimiter) - Fixed window with elastic expiration → (
alimits.strategies.AsyncFixedWindowElasticRateLimiter)
Resources
- https://limits.readthedocs.io/en/stable/strategies.html
- https://medium.com/figma-design/an-alternative-approach-to-rate-limiting-f8a06cf7c94c
- https://cloud.google.com/architecture/rate-limiting-strategies-techniques
Storage Backends
Each of the above rate limiters support a couple different storage backends:
- Memory (in-memory, volatile) → (
alimits.storage.AsyncMemoryStorage) - Redis (on-disk or in-memory, persistent) → (
alimits.storage.AsyncRedisStorage)
Other storage backends are a WIP.
License
Copyright (c) 2021 Elias Gabriel, 2020 Laurent Savaete, 2015 Ali-Akber Saifee
This software is licensed under the MIT License.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the forest you’ll be creating employment for local families and restoring wildlife habitats.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alimits-1.0.0.tar.gz.
File metadata
- Download URL: alimits-1.0.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a3c6f3a92ce8ce352668b0db72f7000db6bc19fad7ef7c2c3b83c778f5000b8
|
|
| MD5 |
145c8f794c526a32e919a9a095464a3d
|
|
| BLAKE2b-256 |
dd23f3492f4089004d3c67692ef95c697e0554b803afd4dc9ddac582664e7954
|
File details
Details for the file alimits-1.0.0-py3-none-any.whl.
File metadata
- Download URL: alimits-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e97aa5ed4c58eb16dd81f8d6118c0cb1c06ef68fd451ce84dfbb5be12a6587db
|
|
| MD5 |
bc3aa4946c7f14e2b302eff2533b111d
|
|
| BLAKE2b-256 |
dc1f70aa99cffa50fc785d457559dcc58601d6b44f0cab6874216aee5e023f45
|