django-ratelimit
Cache-based rate-limiting for Django.
Decision gist · record as of 2026-08-14
Yes. The package is production-stable, dependency-free, and widely used. Dormant maintenance is not a blocker for a mature, single-purpose tool with no known vulnerabilities. Install if you need straightforward IP- or field-based rate-limiting in Django; consider alternatives only if you need advanced features like distributed rate-limiting across multiple servers or async view support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django and Python 3.7 or later; rate-limiting depends on Django's cache framework being configured.
- Low friction install with no runtime dependencies.
- Dormant maintenance status (last commit 2024-07-11, no releases in over 1 year), but marked Production/Stable and actively used across millions of monthly downloads.
License · maintenance · safety
permissive license (permissive) — Apache Software License 2.0 (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you include the license notice.
last release 2023-07-24 (1117 days) · last repo commit 2024-07-11 · 1,145 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,711,339 downloads/mo, #2,926 on PyPI
Alternatives
Verify before relying
pip install django-ratelimit
from django_ratelimit.decorators import ratelimit
@ratelimit(key='ip', rate='10/h')
def my_view(request):
return HttpResponse('OK')- Whether rate-limit state persists across Django cache backends or is limited to specific cache types
- Whether the decorator supports async Django views or only synchronous views
- Specific rate-limit format syntax and supported time windows beyond the examples in documentation
What it is and what it does
Django Ratelimit is a lightweight decorator-based rate-limiting library for Django views. It enforces request limits by tracking access patterns in Django's cache backend, allowing you to throttle views based on IP address or custom request fields. The library is designed to protect views from abuse by rejecting requests that exceed a specified rate.
The package has been stable since its initial release and supports Python 3.7, 3.8, 3.9, 3.10, and 3.11. It carries no external runtime dependencies beyond Django itself, making it straightforward to integrate into existing projects. Maintenance is dormant but the codebase is marked Production/Stable and sees substantial real-world use.
Use it for
- Protect API endpoints from brute-force attacks by limiting requests per IP address
- Throttle user-submitted form submissions to prevent spam or resource exhaustion
- Enforce fair-use policies on public endpoints by rate-limiting per authenticated user or session
- Prevent scraping or automated access to sensitive views by capping request frequency
- Implement tiered access control where different endpoints have different rate limits
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is production-stable, dependency-free, and widely used. Dormant maintenance is not a blocker for a mature, single-purpose tool with no known vulnerabilities. Install if you need straightforward IP- or field-based rate-limiting in Django; consider alternatives only if you need advanced features like distributed rate-limiting across multiple servers or async view support.
Install
django-ratelimit on PyPI
Before you install
Low friction install with no runtime dependencies. Dormant maintenance status (last commit 2024-07-11, no releases in over 1 year), but marked Production/Stable and actively used across millions of monthly downloads.
Requires Django and Python 3.7 or later; rate-limiting depends on Django's cache framework being configured.
License in practice
Apache Software License 2.0 (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you include the license notice.
Quickstart
pip install django-ratelimit
from django_ratelimit.decorators import ratelimit
@ratelimit(key='ip', rate='10/h')
def my_view(request):
return HttpResponse('OK')
Verify before relying
- Whether rate-limit state persists across Django cache backends or is limited to specific cache types
- Whether the decorator supports async Django views or only synchronous views
- Specific rate-limit format syntax and supported time windows beyond the examples in documentation
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,117 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,711,339 / month, #2,926 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: django_ratelimit-4.1.0-py2.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 › “django rate limiting decorator”
- django-ratelimitProvides a Django decorator to rate-limit views based on IP address…
- ratelimRatelim enforces rate limits on function calls by decorating them to…
- ratelimiterEnforces rate limiting on function calls and operations, supporting…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also ratelimit · ratelimiter · fastapi-limiter · requests-ratelimiter · ratelim · Flask-Limiter · apeye · django-axes · django-defender · jason