Asynchronous AIMD-based rate limiter
Project description
aimd-limiter
Asynchronous Python rate limiter built around the Additive Increase Multiplicative Decrease (AIMD) control loop with slow start, congestion avoidance, and fast recovery behaviors.
Features
- Fully asynchronous API compatible with Python 3.10+.
- Deterministic AIMD core with slow start, congestion avoidance, and fast recovery.
- Designed for integration inside asyncio-based services and SDKs.
- 100% test coverage.
Usage Example
import asyncio
from aimd_limiter import AIMDAsyncLimiter
async def main() -> None:
limiter = AIMDAsyncLimiter(max_rate=20.0)
async with limiter.acquire():
# Perform work guarded by AIMD flow control.
...
asyncio.run(main())
Documentation
Development
uv sync --all-groups
uv run pre-commit install
uv run pytest
uv run pre-commit run --all-files --show-diff-on-failure
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 aimd_limiter-0.1.0.tar.gz.
File metadata
- Download URL: aimd_limiter-0.1.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53b5157c2592f3fe38c95d29975faa94174b2de5edfd81bac2cab5eb63d8cd5d
|
|
| MD5 |
ae6264aad2a2056e83300af5fe78ea39
|
|
| BLAKE2b-256 |
5bb039e3de69cc316281e678c4e90c22283bc3fb0f1c6704a3317ef7919508fe
|
Provenance
The following attestation bundles were made for aimd_limiter-0.1.0.tar.gz:
Publisher:
ci-cd.yml on mxcoras/aimd-limiter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aimd_limiter-0.1.0.tar.gz -
Subject digest:
53b5157c2592f3fe38c95d29975faa94174b2de5edfd81bac2cab5eb63d8cd5d - Sigstore transparency entry: 630594836
- Sigstore integration time:
-
Permalink:
mxcoras/aimd-limiter@5e6872fea12813e96fc3304a82faaa701bc95040 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mxcoras
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@5e6872fea12813e96fc3304a82faaa701bc95040 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aimd_limiter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aimd_limiter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a42d2ea8ee33713e5af6877eb85483bfb060fa36d331cc197ec1a06ec25a186
|
|
| MD5 |
9cdd6b650b9b01ed73b801b8816b691a
|
|
| BLAKE2b-256 |
5955f6ee80ad3657fa9de24218104aae3c8869ce4ffcffa865e9de6d59ec0a85
|
Provenance
The following attestation bundles were made for aimd_limiter-0.1.0-py3-none-any.whl:
Publisher:
ci-cd.yml on mxcoras/aimd-limiter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aimd_limiter-0.1.0-py3-none-any.whl -
Subject digest:
5a42d2ea8ee33713e5af6877eb85483bfb060fa36d331cc197ec1a06ec25a186 - Sigstore transparency entry: 630594839
- Sigstore integration time:
-
Permalink:
mxcoras/aimd-limiter@5e6872fea12813e96fc3304a82faaa701bc95040 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mxcoras
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@5e6872fea12813e96fc3304a82faaa701bc95040 -
Trigger Event:
push
-
Statement type: