Skip to main content

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:
    • ForeignKey
    • ManyToManyField
    • OneToOneField
  • 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_related
    • prefetch_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

📸 Screenshots

Dashboard

URL Explorer

Model Relationships

Serializer Inspector

Query Optimization


⚡ Installation

Step 1: Install the package

pip install drf-inspector==0.12

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

drf_inspector-0.1.2.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drf_inspector-0.1.2-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file drf_inspector-0.1.2.tar.gz.

File metadata

  • Download URL: drf_inspector-0.1.2.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for drf_inspector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 deb9a2745481eaa26befd64a1e4706d03f3c7820e02fb80d0fa8ceee12ee0ca5
MD5 c503c94c9fa4a917fb68711847585a0d
BLAKE2b-256 7fd152b25a4e01d5cf735ef329313d8dbe8a0e03c87b7b817eea66e918ea811c

See more details on using hashes here.

File details

Details for the file drf_inspector-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: drf_inspector-0.1.2-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

Hashes for drf_inspector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d945dbf984a618ffc4beea986d862a213e032156f437a660d27d2db1ad56e0ab
MD5 3611f412e77de9a2418c2c39505adb7a
BLAKE2b-256 372785f10945cec417f34384c87a2014b0c24a7321fba018fe43bca9f711641c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page