skillfed

ratelimiter

Simple python rate limiting object

ratelimiter v1.2.0.post0 556.1K downloads/30d#6,022 on PyPI126
Permissive license Apache Abandoned released

What it is and what it does

RateLimiter is a lightweight Python module that enforces rate limiting on function calls and operations. It lets you specify a maximum number of calls allowed within a given time period, then automatically throttles execution to stay within that limit—useful when integrating with third-party APIs that impose request quotas.

The package supports three usage patterns: as a decorator on functions, as a context manager for wrapping code blocks, and as an async context manager for asyncio code. It can also invoke a callback (either a regular function or coroutine) when rate limiting occurs. Since the package has no runtime dependencies, installation is frictionless, but it has been archived and unmaintained since 2017-12-12.

Use it for:

  • Throttle API requests to respect rate limits imposed by external services (e.g., 10 requests per second).
  • Wrap database queries or I/O operations to prevent overwhelming a resource-constrained backend.
  • Decorate async functions in asyncio applications to enforce call frequency limits without blocking the event loop.
  • Implement backoff callbacks that log or notify when rate limiting is triggered, for monitoring and debugging.

Worth the install?

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

Enforces rate limiting on function calls and operations, supporting decorator, context manager, and async patterns to throttle execution to a maximum number of calls within a specified time period.

Yes, if you need simple rate limiting and can accept an unmaintained package. The code is stable and has no known vulnerabilities, but you should verify compatibility with your Python version and test thoroughly before relying on it in production. Consider alternatives if you need ongoing maintenance or support.

Install

ratelimiter on PyPI

pip

pip install ratelimiter

uv

uv add ratelimiter

poetry

poetry add ratelimiter

Installing ratelimiter

Before you install

Installation is straightforward with no runtime dependencies. However, the package is archived and unmaintained since its latest release on 2017-12-12, with no updates since then—use only if you accept that bugs or compatibility issues will not be addressed.

License in practice

Licensed under Apache (permissive), allowing commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.

Quickstart

from ratelimiter import RateLimiter

@RateLimiter(max_calls=10, period=1)
def do_something():
    pass

do_something()

Verify before relying

  • Whether the package works reliably with modern Python versions (requires_python is unspecified in metadata).
  • Whether asyncio support remains functional on current Python releases given the age of the codebase.

Package facts

License Apache (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 3,167 days since the last release
Last repo commit (repository archived)
First released
Downloads 556,077/month — #6,022 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ratelimiter-1.2.0.post0-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: Apache Software License

Tags

rate limiting decoratorthrottle function callsapi rate limitermax calls per secondrequest throttlingasync rate limitingcall frequency control
throttlingapi-integrationasync-support

More Utilities packages