A comprehensive Django app that provides visualization and analysis of your DRF backend.
Project description
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==0.1.4
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/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file drf_inspector-0.1.4.tar.gz.
File metadata
- Download URL: drf_inspector-0.1.4.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eaa8530bda5989149f78af19a6a569ba400c44ded523c1ee7309b57ca30264f
|
|
| MD5 |
a285602afbd13f0c4c3c9dca2206588e
|
|
| BLAKE2b-256 |
20b5b5fef9e11c99b917fa8edb2d45a5f722406a3e299f112cfb0d3157f218d9
|
File details
Details for the file drf_inspector-0.1.4-py3-none-any.whl.
File metadata
- Download URL: drf_inspector-0.1.4-py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e741c5bf0a9708b8b69f00c884a73e539755fd44b57d4102ce78444c9743264
|
|
| MD5 |
e0ab684f9f3e0cbde7f413d15b57a9fd
|
|
| BLAKE2b-256 |
8cb246e95f052a6984bb25da4c54df383914313345a3364c7fe978a7496eb461
|