django-ratelimit
CommunitySafeguard Django apps with Redis rate limits.
Authorcarlos-ASG
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Django rate limiting patterns using django-ratelimit with Redis backend to protect views from abuse and spam. Trigger: When implementing rate limiting, spam protection, or throttling in Django views.
Core Features & Use Cases
- Redis-backed rate limiting for Django views
- Decorator-based integration for both function-based and class-based views
- Flexible keys (ip, user, user_or_ip, header, GET/POST params)
- Block or track mode to tailor response handling
- Suitable for spam protection, brute-force mitigation, and API protection
Quick Start
Install dependencies and enable in a Django project:
- pip install django-ratelimit redis
- Configure Redis URL in settings (REDIS_URL) and set up CACHES backend
- Apply the ratelimit decorator to a view, e.g.: from django.http import HttpRequest, HttpResponse from django_ratelimit.decorators import ratelimit
@ratelimit(key='ip', rate='5/m', method='POST', block=False) def submit_view(request: HttpRequest) -> HttpResponse: if getattr(request, 'limited', False): return HttpResponse('Rate limit exceeded', status=429) return HttpResponse('OK')
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: django-ratelimit Download link: https://github.com/carlos-ASG/tu-voz-en-ruta/archive/main.zip#django-ratelimit Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.