alimits-1.0.0
توضیحات
Provides asyncio storage and strategy implementations for the limits library.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | alimits-1.0.0 |
| نام | alimits |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Elias Gabriel |
| ایمیل نویسنده | me@eliasfgabriel.com |
| آدرس صفحه اصلی | https://github.com/thearchitector/alimits |
| آدرس اینترنتی | https://pypi.org/project/alimits/ |
| مجوز | MIT |
# alimits


[](https://ecologi.com/eliasgabriel?r=6128126916bfab8bd051026c)
Provides asyncio-compatible implementations of the [`limits` library](https://limits.readthedocs.io/en/stable/) storage and strategy options.
Used in the [`slowapi` library](https://slowapi.readthedocs.io/en/latest/).
Documentation is available [here](https://thearchitector.github.io/alimits/).
Available on PyPi at [alimits](https://pypi.org/project/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
1. <https://limits.readthedocs.io/en/stable/strategies.html>
2. <https://medium.com/figma-design/an-alternative-approach-to-rate-limiting-f8a06cf7c94c>
3. <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](LICENSE).
---
This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://ecologi.com/eliasgabriel?r=6128126916bfab8bd051026c) to thank us for our work. By contributing to the forest you’ll be creating employment for local families and restoring wildlife habitats.
نیازمندی
| مقدار | نام |
|---|---|
| >=1.5.1,<2.0.0 | limits |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl alimits-1.0.0:
pip install alimits-1.0.0.whl
نصب پکیج tar.gz alimits-1.0.0:
pip install alimits-1.0.0.tar.gz