ratelimiter
Simple python rate limiting object
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 ratelimiteruv
uv add ratelimiterpoetry
poetry add ratelimiterInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
fastapi-limiterAdds request rate limiting to FastAPI routes…
permissive · top 5,000 on PyPI
loop-rate-limitersProvides synchronous and asynchronous rate…
permissive · top 15,000 on PyPI
ratelimRatelim enforces rate limits on function calls…
permissive · top 5,000 on PyPI
throttlerProvides rate limiting, concurrency limiting,…
permissive · top 5,000 on PyPI
django-ratelimitProvides a Django decorator to rate-limit views…
permissive · top 5,000 on PyPI
ratelimitA function decorator that enforces rate limits…
permissive · top 5,000 on PyPI
asyncio-throttleProvides a simple async context manager to…
permissive · top 15,000 on PyPI
asynciolimiterProvides rate limiting for async Python code by…
permissive · top 5,000 on PyPI
marketorestpythonPython client library that wraps the Marketo…
permissive · top 15,000 on PyPI
apiclientA lightweight framework for building HTTP API…
permissive · top 15,000 on PyPI