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 comprehensive Django app that provides visualization and analysis of your Django REST Framework (DRF) backend architecture. It includes tools for analyzing URLs, models, serializers, views, security, and query optimization, making it easier to understand, document, and optimize your API.

Features

  • URL Analysis: View all your API endpoints, methods, and associated views.
  • Model Visualization: Auto-generate graphs of your database models and their relationships.
  • Serializer Inspection: Inspect serializers and their nested fields/relationships.
  • View Analysis: Analyze views for authentication, permissions, pagination, and more.
  • Security Audit: Identify endpoints lacking proper authentication, permission, or throttling.
  • Query Optimization: Detect N+1 query issues and get suggestions for select_related and prefetch_related.
  • Exporting: Export your architecture as JSON or Markdown.

Quick Start

  1. Install the package:

    pip install drf-inspector
    
  2. Add "drf_inspector" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        "drf_inspector",
    ]
    
  3. Include the drf_inspector URLconf in your project urls.py like this:

    from django.urls import path, include
    
    urlpatterns = [
        ...
        path("drf-inspector/", include("drf_inspector.urls")),
    ]
    
  4. Visit http://127.0.0.1:8000/drf-inspector/ to view the dashboard.

License

MIT License

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.0.tar.gz (17.9 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.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drf_inspector-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 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.0.tar.gz
Algorithm Hash digest
SHA256 eed156e529e00b2cd69ece25930fa07e66c0d3f530004c7664e50a4c1f0d3c96
MD5 0810d80c75d838462b57a42e95fa6735
BLAKE2b-256 3115cfc99bc866eb243dad0d610cea29187a516058bab8d9027f1d4cec8353b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drf_inspector-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a3f7c225c08f025c52a7f205de0ccc57e62ef27bf0cc9fb3128d30e8253de8
MD5 096f92aa4c707c66476ff48c4563800e
BLAKE2b-256 0ca128faeb33a1c12f9af3c1ba9fe2afb8b03de1c487ef27f7313f0adf40d5df

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