skillfed

asyncio-throttle

Simple, easy-to-use throttler for asyncio

asyncio-throttle v1.0.2 798.0K downloads/30d#5,030 on PyPI127
Permissive license MIT Abandoned released

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-throttle

uv

uv add asyncio-throttle

poetry

poetry add asyncio-throttle

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

asyncio rate limitingasync throttlerrate limit concurrent tasksasyncio concurrency controllimit requests per secondasync work throttlingasyncio rate cap
asynciorate-limitingconcurrency-control

More Python Modules packages