DRF Inspector
DRF Inspector is a powerful developer tool for analyzing, visualizing, and understanding Django REST Framework (DRF) backends.
It automatically inspects your project architecture and provides interactive visualizations for:
- API endpoints
- serializers
- models
- relationships
- views
- query optimization
- security analysis
- architecture exporting
DRF Inspector helps developers debug, document, optimize, and better understand complex DRF projects.
✨ Features
🌐 API & URL Analysis
- Inspect all DRF endpoints automatically
- Detect HTTP methods (
GET,POST,PATCH, etc.) - View connected views and serializers
- Search and filter endpoints
🧠 Model Visualization
- Auto-generate model relationship graphs
- Visualize:
ForeignKeyManyToManyFieldOneToOneField
- Interactive relationship mapping
🔍 Serializer Inspection
- Detect serializers used in views
- Inspect serializer fields
- Detect nested serializers
- Show serializer → model mappings
🧭 View Analysis
- Analyze:
- authentication classes
- permission classes
- pagination
- throttling
- filtering
- Supports DRF class-based views and ViewSets
🔒 Security Audit
- Detect endpoints missing:
- authentication
- permissions
- throttling
- Helps identify insecure API routes
⚡ Query Optimization Detection
- Detect possible N+1 query issues
- Suggest:
select_relatedprefetch_related
- Analyze queryset optimization opportunities
📦 Exporting
Export project architecture as:
- JSON
- Markdown
Useful for:
- documentation
- architecture reviews
- team sharing
- AI context sharing
🖥️ Interactive Dashboard
- Built directly into Django
- No React required
- No external frontend setup
- Works instantly inside your project
🔗 Links
- GitHub: https://github.com/codewithubaid1/drf-inspector
- PyPI: https://pypi.org/project/drf-inspector/
📸 Screenshots
Dashboard
URL Explorer
Model Relationships
Serializer Inspector
Query Optimization
⚡ Installation
Step 1: Install the package
pip install drf-inspector
Step 2: Add in settings.py:
installed_apps = [
drf_inspector,
....
]
Step 3: Add in project urls.py:
from django.urls import path, include
urlpatterns = [
...,
path("drf-inspector/",include("drf_inspector.urls")),
]
Final Step : Go to the url and that's it:
http://127.0.0.1:8000/drf-inspector/
Metadata
Release files for drf-inspector 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drf_inspector-0.1.6.tar.gz | 19.5 kB | Without provenance | Details for drf_inspector-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drf_inspector-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for drf_inspector-0.1.6-py3-none-any.whl |
Total release size: 49.0 kB
Release files / drf_inspector-0.1.6.tar.gz
| Download URL | drf_inspector-0.1.6.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
918fb64cb2700b3840800c955a59dd92d5be0015a8bea678c096b4ed55311931
|
|
BLAKE2b-256 checksum How to use checksums |
c0cb9b149a2980f5d220aab6b119ac5b4bae10829f23478ff00a16c9e0a7c423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / drf_inspector-0.1.6-py3-none-any.whl
| Download URL | drf_inspector-0.1.6-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7f58e94faa3fd02a4523b144accfc86c80e547e75ba4f758b38068911e46f82
|
|
BLAKE2b-256 checksum How to use checksums |
594ed02fe21eb7fa0730d292ff1104d207c10ed3ff616f07ed601cb3d1e769a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for drf-inspector 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.