Skip to main content

alimits

GitHub Workflow Status GitHub Buy a tree

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

  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.


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.

Metadata

Release files for alimits 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alimits 1.0.0
File Size Uploaded Provenance Actions
alimits-1.0.0.tar.gz 7.3 kB Without provenance Details for alimits-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alimits 1.0.0
File Interpreter ABI Platform Actions
alimits-1.0.0-py3-none-any.whl Python 3 none any Details for alimits-1.0.0-py3-none-any.whl

Total release size: 16.0 kB

Release files / alimits-1.0.0.tar.gz

Download URL alimits-1.0.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0a3c6f3a92ce8ce352668b0db72f7000db6bc19fad7ef7c2c3b83c778f5000b8
BLAKE2b-256 checksum
How to use checksums
dd23f3492f4089004d3c67692ef95c697e0554b803afd4dc9ddac582664e7954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.2 Windows/10

Release files / alimits-1.0.0-py3-none-any.whl

Download URL alimits-1.0.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e97aa5ed4c58eb16dd81f8d6118c0cb1c06ef68fd451ce84dfbb5be12a6587db
BLAKE2b-256 checksum
How to use checksums
dc1f70aa99cffa50fc785d457559dcc58601d6b44f0cab6874216aee5e023f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.2 Windows/10

Security for alimits 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page