Skip to main content

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

🔗 Links


📸 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/

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.5.tar.gz (19.4 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.5-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drf_inspector-0.1.5.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for drf_inspector-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a44e7a53a5ba03da7f28a318fe0f7a1789c8e0dff8de5938b5d65700276e5baa
MD5 4c660df766760aaa821a7449965a60f8
BLAKE2b-256 6183a24c2c4666098a288cfd9f186a9f15a929c1a067abcf71960afc8aba1fba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drf_inspector-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for drf_inspector-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0892becaf1c2fc6c74d75b91eecee44a6aa5933e46f8805641ec2af719812c7a
MD5 eec3a83eaa76e54e64df1b0626e29aa4
BLAKE2b-256 c27f7b6004d26c8941b3e4e139f0b958a19c9a61300fa8568a715c0a8cd77d9b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.6

2 files

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page