Skip to main content

Interactive schema visualization for Django projects — React Flow + force-directed layout

Project description

django-schematic

Interactive schema visualization for Django projects.

See all your models, fields, and relationships as an interactive, force-directed graph — directly in your browser. Zero Node.js required at runtime.

Features

  • Force-directed layout with physics settle animation (drag-to-pin support)
  • Hierarchical layout via dagre
  • Click to expand/collapse field lists per model
  • App-based color coding
  • Show/hide models and apps via sidebar
  • Export/import view state as JSON
  • Export diagram as PNG
  • Clean JSON API endpoint (GET /schema/api/)
  • Django 5.x + Python 3.12+ only

Screenshots

Screenshot 2026-04-12 at 11 13 05 PM Screenshot 2026-04-12 at 11 13 46 PM Screenshot 2026-04-12 at 11 15 06 PM

Quick Start

pip install django-schematic

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    "schematic",
]

Add to urls.py (behind a staff-only guard in production):

from django.urls import include, path

urlpatterns = [
    ...
    path("schema/", include("schematic.urls")),
]

Visit http://localhost:8000/schema/ — your model graph will be there.

Configuration

# settings.py (all optional — these are the defaults)
SCHEMATIC = {
    "visible": True,              # or callable(request) -> bool
    "include_apps": [],           # empty = all apps
    "exclude_apps": ["admin", "contenttypes", "sessions", "auth"],
    "exclude_models": {},         # {"myapp": ["InternalModel"]}
    "include_abstract": False,
    "include_proxy": True,
}

API

The schema is also available as JSON:

GET /schema/api/
GET /schema/api/?apps=myapp,otherapp

Development

# Backend
pip install -e ".[dev]"
pytest

# Frontend
cd ui
npm install
npm run dev   # Vite dev server with HMR
npm run build # Outputs to schematic/static/schematic/

License

MIT

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

django_schematic-1.0.2.tar.gz (590.0 kB view details)

Uploaded Source

Built Distribution

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

django_schematic-1.0.2-py3-none-any.whl (594.7 kB view details)

Uploaded Python 3

File details

Details for the file django_schematic-1.0.2.tar.gz.

File metadata

  • Download URL: django_schematic-1.0.2.tar.gz
  • Upload date:
  • Size: 590.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_schematic-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7ab6977b4a0b16ad399382de538a23b9864f55e1e01f0b4356f39e203adc1403
MD5 f5a4266b4cc649e93a9beee3184410f2
BLAKE2b-256 6f0bffc0e2684e5fd426277709975223a85665cf7b737205dc74491edc3316ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_schematic-1.0.2.tar.gz:

Publisher: release.yml on jsheffie/django-schematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_schematic-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_schematic-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e551ee99f88afced49cc8d8dc11e3949be25120c419f3beae33eeaa27914b24f
MD5 ccd2a1439ddedb0dea1181f2a3895691
BLAKE2b-256 9728c52aee44e4b9ef3f6a5e5549e097f51348d001847546e7f74f6f1da61d76

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_schematic-1.0.2-py3-none-any.whl:

Publisher: release.yml on jsheffie/django-schematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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