skillfed

throttler

Zero-dependency Python package for easy throttling with asyncio support

throttler v1.2.3 1.3M downloads/30d#4,039 on PyPI107
Permissive license MIT License Copyright (c) 2020 Ramzan Bekbulatov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) Active released

What it is and what it does

Throttler is a zero-dependency Python package that provides four complementary tools for controlling execution timing and concurrency in asyncio programs. It exposes both context managers and decorators: Throttler enforces rate limits (e.g., 10 requests per second), ThrottlerSimultaneous caps concurrent tasks (e.g., at most 5 in-flight calls), ExecutionTimer enforces fixed spacing between iterations with optional wall-clock alignment, and Timer logs timing statistics across repeated operations.

The package is designed for scenarios where you need to respect API rate limits, prevent resource exhaustion from too many concurrent operations, or maintain consistent execution intervals. Throttler and ThrottlerSimultaneous are async-only and must run within an event loop, while ExecutionTimer and Timer support both sync and async usage. The implementation uses a sliding window for rate limiting and an async semaphore for concurrency control.

Use it for:

  • Rate-limit API calls to respect external service quotas (e.g., 10 requests per 3 seconds).
  • Cap concurrent async tasks to prevent overwhelming a resource pool (e.g., max 5 simultaneous HTTP requests).
  • Enforce fixed-interval execution for periodic jobs (e.g., run a task once per minute, aligned to wall-clock).
  • Measure and log timing statistics for repeated operations to identify performance regressions.
  • Combine rate and concurrency limits for APIs that enforce both constraints simultaneously.

Worth the install?

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

Provides rate limiting, concurrency limiting, execution timing, and performance monitoring for Python asyncio code through context managers and decorators.

Yes. Zero dependencies, active maintenance, MIT license, and broad Python version support (3.8–3.14) make it a low-risk choice. Install friction is minimal and the API is straightforward. Use it when you need rate limiting, concurrency control, or execution timing in asyncio code.

Install

throttler on PyPI

pip

pip install throttler

uv

uv add throttler

poetry

poetry add throttler

Installing throttler

Before you install

Low friction: pure Python wheel with zero runtime dependencies and active maintenance (last commit 2026-05-19, 199 days since release).

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.

Quickstart

pip install throttler

from throttler import Throttler
import asyncio

async def example():
    t = Throttler(rate_limit=3, period=1.0)
    async with t:
        pass

asyncio.run(example())

Requires Python 3.8 or later; async context managers must run within an event loop.

Package facts

License MIT License Copyright (c) 2020 Ramzan Bekbulatov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 199 days since the last release
Last repo commit
First released
Downloads 1,333,594/month — #4,039 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: throttler-1.2.3-py3-none-any.whl

Keywords: asyncio, aio-throttle, aiothrottle, aiothrottler, aiothrottling, asyncio-throttle, rate-limit, rate-limiter, throttling, throttle, throttler

Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseProgramming 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.8Programming Language :: Python :: 3.9Typing :: Typed

Tags

asyncio rate limitingthrottle async functionsconcurrency limiterrate limiter pythonasync throttlerexecution timingapi rate limiting
asynciorate-limitingconcurrency-control

More Software Development packages