rush
A library for throttling algorithms
What it is and what it does
rush is a small, focused library for implementing rate-limiting and throttling logic in Python applications. It provides two main algorithms—a basic periodic interval limiter and a leaky bucket rate limiter based on GCRA—along with pluggable storage backends so you can choose between Redis for distributed state or an in-memory dictionary for testing and prototyping. The library is fully typed, well-tested, and documented.
The package is designed to be algorithm-agnostic and storage-agnostic, meaning you can mix and match limiters and backends without worrying about compatibility. It's useful when you need to enforce rate limits on API calls, user interactions, or other resource access patterns. However, the project has been abandoned since early 2021 with no active maintenance, so it will not receive bug fixes, security patches, or updates for newer Python versions.
Use it for:
- Enforce rate limits on outbound API calls to third-party services.
- Throttle user requests in a web application to prevent abuse or resource exhaustion.
- Implement distributed rate limiting across multiple application instances using a Redis backend.
- Prototype and test rate-limiting logic quickly using the in-memory storage backend.
- Add request throttling to a CLI tool or batch job that interacts with rate-limited APIs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
rush provides rate-limiting algorithms (periodic interval and leaky bucket GCRA) with pluggable storage backends (Redis or in-memory) for throttling access to resources like APIs.
Yes, if you need a simple, well-typed rate-limiting library and can accept that it will not receive updates. The code is stable and production-ready (Development Status 5), has no known vulnerabilities, and low install friction. However, do not use it if you require active maintenance, security patches, or support for Python versions beyond 3.7.
Install
rush on PyPI
pip
pip install rushuv
uv add rushpoetry
poetry add rushInstalling rush
Before you install
Low install friction with a single runtime dependency (attrs). However, the package is abandoned—last release was 2021-04-01 and last commit 2023-03-27—so no maintenance or security updates are forthcoming.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions, making it safe from a licensing perspective for most projects.
Quickstart
pip install rush
from rush.limiters import Limiter
from rush.stores import MemoryStore
store = MemoryStore()
limiter = Limiter(store, max_attempts=5)
if limiter.try_acquire('user_id'):
# Allow request
pass
Requires Python 3.6 or later. Redis backend requires additional redis and rfc3986 dependencies if using Redis storage instead of in-memory.
Verify before relying
- Whether the package works reliably with Python versions beyond 3.7 (classifiers only list 3.6 and 3.7, but requires_python says >=3.6)
- Whether abandonment and lack of maintenance since 2021 poses compatibility risks with modern Python or dependency ecosystems
- Specific rate-limit interval values and configuration defaults for the periodic interval and GCRA limiters
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — attrs |
| Maintenance | abandoned — 1,961 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 299,368/month — #7,860 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rush-2021.4.0-py3-none-any.whl
Keywords: throttles, throttle, algorithm, gcra, redis
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
pyrate-limiterPyrateLimiter implements the Leaky-Bucket…
permissive · top 5,000 on PyPI
throttled-pyImplements rate limiting with multiple…
permissive · top 15,000 on PyPI
token-throttlerToken throttler implements rate limiting using…
permissive · top 15,000 on PyPI
limitsImplements rate limiting with multiple…
permissive · top 1,000 on PyPI
httpx-limiterProvides rate-limited HTTP transports for httpx…
permissive · top 15,000 on PyPI
upstash-ratelimitProvides connectionless rate limiting for…
permissive · top 15,000 on PyPI
requests-ratelimiterAdds rate-limiting to the requests library by…
permissive · top 5,000 on PyPI
aiolimiterImplements a rate limiter for asyncio using the…
permissive · top 5,000 on PyPI
asynciolimiterProvides rate limiting for async Python code by…
permissive · top 5,000 on PyPI
loop-rate-limitersProvides synchronous and asynchronous rate…
permissive · top 15,000 on PyPI