requests-ratelimiter
Rate-limiting for the requests library
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a common problem (rate-limiting HTTP requests) with a clean API that integrates naturally with requests. Use it when you need to respect API quotas or protect services from being overwhelmed by outbound traffic.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- For multi-threaded or multi-process environments, use a persistent backend (SQLiteBucket or Redis) to share rate limits across threads/processes.
- Low friction: pure Python wheel with only two runtime dependencies (pyrate-limiter and requests).
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2026-04-22 (114 days) · last repo commit 2026-07-25 · 118 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 857,308 downloads/mo, #4,883 on PyPI
Alternatives
Verify before relying
from requests_ratelimiter import LimiterSession
# Create a session with a 5 requests-per-second limit
session = LimiterSession(per_second=5)
# Use it like a normal requests.Session
response = session.get('https://api.example.com/data')
print(response.json())- Whether per-host rate limit tracking works correctly across concurrent requests in multi-threaded environments without a persistent backend
- Performance characteristics when handling thousands of concurrent rate-limited requests
What it is and what it does
requests-ratelimiter is a thin wrapper around pyrate-limiter that integrates rate-limiting directly into the requests library workflow. It implements the leaky bucket algorithm and lets you enforce rate limits by requests per second, minute, hour, day, or month. The package tracks limits separately per host by default, so requests to different APIs don't interfere with each other's quotas.
You can use it three ways: as a drop-in replacement for requests.Session (LimiterSession), as a transport adapter mounted on an existing session (LimiterAdapter), or as a mixin for custom session classes. It supports in-memory tracking by default, with optional SQLite or Redis backends for persistence across threads and processes. Rate limits can be uniform across all hosts or customized per host or URL prefix.
Use it for
- Scraping or polling multiple APIs with different rate limits by mounting different adapters to each host
- Building a web service that must respect upstream API quotas while handling concurrent requests across threads
- Enforcing tenant-specific rate limits in a multi-tenant application using custom bucket tracking
- Testing HTTP clients under controlled rate-limit conditions without hitting real API limits
- Protecting downstream services by rate-limiting outbound requests from a client application
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a common problem (rate-limiting HTTP requests) with a clean API that integrates naturally with requests. Use it when you need to respect API quotas or protect services from being overwhelmed by outbound traffic.
Install
requests-ratelimiter on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (pyrate-limiter and requests). Actively maintained with recent commits and a stable release history since 2021.
Requires Python 3.10 or later. For multi-threaded or multi-process environments, use a persistent backend (SQLiteBucket or Redis) to share rate limits across threads/processes.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
from requests_ratelimiter import LimiterSession
# Create a session with a 5 requests-per-second limit
session = LimiterSession(per_second=5)
# Use it like a normal requests.Session
response = session.get('https://api.example.com/data')
print(response.json())
Verify before relying
- Whether per-host rate limit tracking works correctly across concurrent requests in multi-threaded environments without a persistent backend
- Performance characteristics when handling thousands of concurrent rate-limited requests
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespyrate-limiterrequests |
| Maintenance | Actively maintained 114 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 857,308 / month, #4,883 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming 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.15Typing :: Typed |
Evidence: requests_ratelimiter-0.10.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “rate limit http requests”
- requests-ratelimiterAdds rate-limiting to the requests library by wrapping…
- httpx-limiterProvides rate-limited HTTP transports for httpx clients, supporting…
- httpxthrottlecacheWraps HTTPX with built-in rate limiting and caching transports,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also fastapi-limiter · httpx-limiter · pyrate-limiter · asynciolimiter · django-ratelimit · python-redis-rate-limit · httpxthrottlecache · slowapi · Flask-Limiter · rush