
Django Drf
This is a comprehensive pattern library for Django REST Framework APIs, built around the Prowler project's conventions but applicable to any DRF codebase that takes API design seriously. It enforces separation of serializers by operation (read, create, update, include), handles N+1 queries with explicit prefetch patterns, and includes decision trees for choosing the right base classes. The swagger_fake_view handling and extend_schema_field decorators show this is battle-tested with drf-spectacular. If you're building JSON:API endpoints with DRF and want opinionated guidance on serializer inheritance, filterset patterns, and permission handling, this gives you working examples and checklists. The no-auto-increment-PKs and no-trailing-slashes rules hint at strong API design opinions underneath.
- skills.sh installs
- 482
- GitHub stars
- 15.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add prowler-cloud/prowler --skill django-drf --agent claude-codeInstalls into .claude/skills of the current project.
Files
Critical Patterns
- ALWAYS separate serializers by operation: Read / Create / Update / Include
- ALWAYS use
filterset_classfor complex filtering (notfilterset_fields) - ALWAYS validate unknown fields in write serializers (inherit
BaseWriteSerializer) - ALWAYS use
select_related/prefetch_relatedinget_queryset()to avoid N+1 - ALWAYS handle
swagger_fake_viewinget_queryset()for schema generation - ALWAYS use
@extend_schema_fieldfor OpenAPI docs onSerializerMethodField - NEVER put business logic in serializers - use services/utils
- NEVER use auto-increment PKs - use UUIDv4 or UUIDv7
- NEVER use trailing slashes in URLs (
trailing_slash=False)
Note:
swagger_fake_viewis specific to drf-spectacular for OpenAPI schema generation.
Implementation Checklist
When implementing a new endpoint, review these patterns in order:
Sponsors
Details
- Repository
- github.com/prowler-cloud/prowler
- Categories
- Backend & APIs, Security, Python, Cloud & Infrastructure
- First seen
- Jun 3, 2026