skillfed

asynciolimiter

Rate limiter for Async IO

asynciolimiter v1.2.0 1.2M downloads/30d#4,248 on PyPI39
Permissive license AGING released

What it is and what it does

asynciolimiter is a rate-limiting library for Python AsyncIO that enforces a maximum request rate by making coroutines wait until a slot becomes available. It offers three implementations: a basic Limiter that accounts for CPU delays, a LeakyBucketLimiter following the leaky bucket algorithm with burst capacity, and a StrictLimiter that enforces a hard rate floor without bursts. The package has no external runtime dependencies and supports Python 3.9 and later.

You use it by instantiating a limiter with a rate (requests per second), then calling `await limiter.wait()` before executing rate-limited work. It integrates directly into async functions and plays well with `asyncio.gather()` and other concurrency patterns. The library is stable and typed, making it suitable for production async applications that need to throttle API calls, database queries, or other I/O-bound operations.

Use it for:

  • Throttle API client requests to respect rate limits imposed by external services.
  • Control database query concurrency to avoid overwhelming a backend or exhausting connection pools.
  • Manage burst traffic in web scrapers or batch jobs to stay within resource budgets.
  • Enforce fair scheduling of background tasks so no single coroutine starves others.
  • Implement backpressure in event-driven systems to prevent downstream overload.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides rate limiting for async Python code by enforcing a maximum request rate and managing concurrent task scheduling within AsyncIO.

Yes, with a note on maintenance. The package is stable, has no dependencies, and solves a common async concurrency problem cleanly. However, it has not been released in over five months despite an active repository, so check whether your use case aligns with the three limiter flavors offered before committing to it. No known vulnerabilities.

Install

asynciolimiter on PyPI

pip

pip install asynciolimiter

uv

uv add asynciolimiter

poetry

poetry add asynciolimiter

Installing asynciolimiter

Before you install

Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last commit was 2025-08-01 and the package has not been released in over five months, though the repository remains active and not archived.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute this package with minimal legal constraints.

Quickstart

pip install asynciolimiter

import asyncio
import asynciolimiter

async def main():
    limiter = asynciolimiter.Limiter(10/5)  # 10 requests per 5 seconds
    await limiter.wait()
    # do work here

asyncio.run(main())

Requires Python 3.9 or later.

Verify before relying

  • Whether the three limiter flavors (Limiter, LeakyBucketLimiter, StrictLimiter) differ meaningfully in performance or accuracy under real workloads.
  • Behavior and thread-safety guarantees when multiple asyncio event loops or tasks interact with the same limiter instance.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 514 days since the last release
Last repo commit
First released
Downloads 1,186,997/month — #4,248 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: asynciolimiter-1.2.0-py3-none-any.whl

Keywords: asyncio, rate limiter, throttling

Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: InternetTopic :: Software Development :: LibrariesTopic :: UtilitiesTyping :: Typed

Tags

asyncio rate limiterasync request throttlingrate limiting for coroutinesasyncio concurrency controlasync task rate limitingleaky bucket rate limiterasyncio request throttle
asynciorate-limitingconcurrency-control

More Libraries packages