asyncio-throttle
Simple, easy-to-use throttler for asyncio
What it is and what it does
asyncio-throttle is a lightweight library that wraps asyncio coroutines to enforce rate limits on concurrent work. It exports a single Throttler class that acts as an async context manager; you wrap any async operation with `async with throttler:` to ensure that no more than a specified number of operations execute within a given time window. The library is designed to integrate cleanly with asyncio patterns and works well with libraries like aiohttp for rate-limiting HTTP requests.
The package has no external dependencies and requires only Python 3.6 or later. It is abandoned—last updated in 2021—so it will not receive updates for newer Python versions or asyncio features. For simple, stateless rate-limiting of concurrent tasks, it remains functional; for projects requiring active maintenance or support for the latest Python releases, a maintained alternative may be preferable.
Use it for:
- Limit HTTP requests to an external API to stay within rate-limit quotas or avoid overwhelming a server.
- Cap the concurrency of database queries or connection pool usage across multiple async workers.
- Throttle file I/O or network operations to prevent resource exhaustion in high-concurrency scenarios.
- Enforce a maximum throughput (e.g., 500 operations per minute) across a pool of async tasks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a simple async context manager to limit the rate at which concurrent asyncio tasks execute work, enforcing a configurable operations-per-second or operations-per-period ceiling.
Yes, for simple rate-limiting of asyncio tasks in projects targeting Python 3.6–3.9. The library is small, has no dependencies, and the core API is stable. However, because it is abandoned and has not been updated since 2021, verify compatibility with your Python version and consider a maintained alternative if you need ongoing support or plan to upgrade to Python 3.10+.
Install
asyncio-throttle on PyPI
pip
pip install asyncio-throttleuv
uv add asyncio-throttlepoetry
poetry add asyncio-throttleInstalling asyncio-throttle
Before you install
No runtime dependencies and a pure-Python wheel distribution make installation straightforward. However, the package is abandoned—last release was 2021-04-07 and last commit 2022-07-12—so it will not receive bug fixes or maintenance for modern Python versions.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from asyncio_throttle import Throttler
import asyncio
async def main():
throttler = Throttler(rate_limit=5) # 5 ops/sec
async with throttler:
print('Work executed at limited rate')
asyncio.run(main())
Requires Python 3.6 or later; package is abandoned and may not be compatible with Python 3.10+.
Verify before relying
- Whether the package remains compatible with Python 3.10+ given its abandoned status and lack of recent testing.
- Real-world performance characteristics under high concurrency or with modern asyncio patterns (e.g., asyncio.TaskGroup).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,955 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 797,984/month — #5,030 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: asyncio_throttle-1.0.2-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
throttlerProvides rate limiting, concurrency limiting,…
permissive · top 5,000 on PyPI
ratelimiterEnforces rate limiting on function calls and…
permissive · top 15,000 on PyPI
token-throttlerToken throttler implements rate limiting using…
permissive · top 15,000 on PyPI
aiolimiterImplements a rate limiter for asyncio using the…
permissive · top 5,000 on PyPI
asynciolimiterProvides rate limiting for async Python code by…
permissive · top 5,000 on PyPI
asgi-ratelimitAn ASGI middleware that enforces rate limits on…
permissive · top 15,000 on PyPI
requests-ratelimiterAdds rate-limiting to the requests library by…
permissive · top 5,000 on PyPI
throttled-pyImplements rate limiting with multiple…
permissive · top 15,000 on PyPI
django-ratelimitProvides a Django decorator to rate-limit views…
permissive · top 5,000 on PyPI
fastapi-limiterAdds request rate limiting to FastAPI routes…
permissive · top 5,000 on PyPI