django-schematic 1.3.2__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-schematic
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Interactive schema visualization for Django projects — React Flow + force-directed layout
5
5
  Project-URL: Homepage, https://github.com/jsheffie/django-schematic
6
6
  Project-URL: Issues, https://github.com/jsheffie/django-schematic/issues
@@ -52,6 +52,21 @@ Description-Content-Type: text/markdown
52
52
 
53
53
  # django-schematic
54
54
 
55
+ [![Latest on Django Packages](https://img.shields.io/badge/Django%20Packages-django--schematic-8c3c26.svg)](https://djangopackages.org/packages/p/django-schematic/)
56
+ [![PyPI version](https://img.shields.io/pypi/v/django-schematic)](https://pypi.org/project/django-schematic/)
57
+ [![PyPI downloads](https://img.shields.io/pypi/dm/django-schematic)](https://pypi.org/project/django-schematic/)
58
+ [![Python versions](https://img.shields.io/pypi/pyversions/django-schematic)](https://pypi.org/project/django-schematic/)
59
+ [![License](https://img.shields.io/pypi/l/django-schematic)](https://github.com/jsheffie/django-schematic/blob/main/LICENSE)
60
+ [![Python Tests](https://github.com/jsheffie/django-schematic/actions/workflows/tests.yml/badge.svg)](https://github.com/jsheffie/django-schematic/actions/workflows/tests.yml)
61
+ [![UI Tests](https://github.com/jsheffie/django-schematic/actions/workflows/ui-tests.yml/badge.svg)](https://github.com/jsheffie/django-schematic/actions/workflows/ui-tests.yml)
62
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
63
+ [![React](https://img.shields.io/badge/React-18-61DAFB?logo=react&logoColor=black)](https://react.dev/)
64
+ [![Vite](https://img.shields.io/badge/Vite-6-646CFF?logo=vite&logoColor=white)](https://vite.dev/)
65
+ [![React Flow](https://img.shields.io/badge/@xyflow%2Freact-React%20Flow-ff0072)](https://reactflow.dev/)
66
+ [![d3-force](https://img.shields.io/badge/layout-d3--force-F9A03C?logo=d3dotjs&logoColor=white)](https://d3js.org/d3-force)
67
+ [![dagre](https://img.shields.io/badge/layout-dagre-4A90D9)](https://github.com/dagrejs/dagre)
68
+ [![ELK](https://img.shields.io/badge/layout-ELK-5C9E4A)](https://eclipse.dev/elk/)
69
+
55
70
  Interactive schema visualization for Django projects.
56
71
 
57
72
  See all your models, fields, and relationships as an interactive, force-directed graph — directly in your browser. Zero Node.js required at runtime.
@@ -68,9 +83,30 @@ See all your models, fields, and relationships as an interactive, force-directed
68
83
  - Clean JSON API endpoint (`GET /schema/api/`)
69
84
  - Django 5.x + Python 3.12+ only
70
85
 
71
- ## Exported PNG file with embeded SVG data
86
+ ## Visualize
87
+
88
+ <img width="800" height="497" alt="output" src="https://github.com/user-attachments/assets/6da57bd5-c0b5-45a8-b087-bdf4ff7661d1" />
89
+
90
+
91
+ ## Frontend Stack
92
+
93
+ | Aspect | Technology |
94
+ |---|---|
95
+ | Framework | React 18 |
96
+ | Language | TypeScript |
97
+ | Graph Visualization | React Flow (`@xyflow/react` 12) |
98
+ | Layout Engines | d3-force + dagre + ELK (3 options) |
99
+ | UI / Styling | TailwindCSS 4 |
100
+ | State Management | Zustand 5 |
101
+ | Bundler | Vite 6 |
102
+ | Type Safety | Full TypeScript |
103
+ | Testing | Vitest + ESLint |
104
+ | CDN Dependencies | None (all bundled) |
105
+ | Package Manager | npm |
106
+
107
+ ## Exported PNG file with embedded config data
72
108
 
73
- This is an example output PNG file, that can be re-imported into djang-schematic
109
+ This is an example output PNG file, that can be re-imported into django-schematic
74
110
 
75
111
  <img width="1200" height="898" alt="DailyGrindStatus-Blog-schematic" src="https://github.com/user-attachments/assets/3fbeae62-68c1-45fe-9ae6-7b52ed77585e" />
76
112
 
@@ -0,0 +1,142 @@
1
+ # django-schematic
2
+
3
+ [![Latest on Django Packages](https://img.shields.io/badge/Django%20Packages-django--schematic-8c3c26.svg)](https://djangopackages.org/packages/p/django-schematic/)
4
+ [![PyPI version](https://img.shields.io/pypi/v/django-schematic)](https://pypi.org/project/django-schematic/)
5
+ [![PyPI downloads](https://img.shields.io/pypi/dm/django-schematic)](https://pypi.org/project/django-schematic/)
6
+ [![Python versions](https://img.shields.io/pypi/pyversions/django-schematic)](https://pypi.org/project/django-schematic/)
7
+ [![License](https://img.shields.io/pypi/l/django-schematic)](https://github.com/jsheffie/django-schematic/blob/main/LICENSE)
8
+ [![Python Tests](https://github.com/jsheffie/django-schematic/actions/workflows/tests.yml/badge.svg)](https://github.com/jsheffie/django-schematic/actions/workflows/tests.yml)
9
+ [![UI Tests](https://github.com/jsheffie/django-schematic/actions/workflows/ui-tests.yml/badge.svg)](https://github.com/jsheffie/django-schematic/actions/workflows/ui-tests.yml)
10
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
11
+ [![React](https://img.shields.io/badge/React-18-61DAFB?logo=react&logoColor=black)](https://react.dev/)
12
+ [![Vite](https://img.shields.io/badge/Vite-6-646CFF?logo=vite&logoColor=white)](https://vite.dev/)
13
+ [![React Flow](https://img.shields.io/badge/@xyflow%2Freact-React%20Flow-ff0072)](https://reactflow.dev/)
14
+ [![d3-force](https://img.shields.io/badge/layout-d3--force-F9A03C?logo=d3dotjs&logoColor=white)](https://d3js.org/d3-force)
15
+ [![dagre](https://img.shields.io/badge/layout-dagre-4A90D9)](https://github.com/dagrejs/dagre)
16
+ [![ELK](https://img.shields.io/badge/layout-ELK-5C9E4A)](https://eclipse.dev/elk/)
17
+
18
+ Interactive schema visualization for Django projects.
19
+
20
+ See all your models, fields, and relationships as an interactive, force-directed graph — directly in your browser. Zero Node.js required at runtime.
21
+
22
+ ## Features
23
+
24
+ - Force-directed layout with physics settle animation (drag-to-pin support)
25
+ - Hierarchical layout via dagre
26
+ - Click to expand/collapse field lists per model
27
+ - App-based color coding
28
+ - Show/hide models and apps via sidebar
29
+ - Export/import view state as JSON
30
+ - Export diagram as PNG
31
+ - Clean JSON API endpoint (`GET /schema/api/`)
32
+ - Django 5.x + Python 3.12+ only
33
+
34
+ ## Visualize
35
+
36
+ <img width="800" height="497" alt="output" src="https://github.com/user-attachments/assets/6da57bd5-c0b5-45a8-b087-bdf4ff7661d1" />
37
+
38
+
39
+ ## Frontend Stack
40
+
41
+ | Aspect | Technology |
42
+ |---|---|
43
+ | Framework | React 18 |
44
+ | Language | TypeScript |
45
+ | Graph Visualization | React Flow (`@xyflow/react` 12) |
46
+ | Layout Engines | d3-force + dagre + ELK (3 options) |
47
+ | UI / Styling | TailwindCSS 4 |
48
+ | State Management | Zustand 5 |
49
+ | Bundler | Vite 6 |
50
+ | Type Safety | Full TypeScript |
51
+ | Testing | Vitest + ESLint |
52
+ | CDN Dependencies | None (all bundled) |
53
+ | Package Manager | npm |
54
+
55
+ ## Exported PNG file with embedded config data
56
+
57
+ This is an example output PNG file, that can be re-imported into django-schematic
58
+
59
+ <img width="1200" height="898" alt="DailyGrindStatus-Blog-schematic" src="https://github.com/user-attachments/assets/3fbeae62-68c1-45fe-9ae6-7b52ed77585e" />
60
+
61
+
62
+
63
+ ## Quick Start
64
+
65
+ ```bash
66
+ pip install django-schematic
67
+ ```
68
+
69
+ Add to `INSTALLED_APPS`:
70
+
71
+ ```python
72
+ INSTALLED_APPS = [
73
+ ...
74
+ "schematic",
75
+ ]
76
+ ```
77
+
78
+ Add to `urls.py`:
79
+
80
+ ```python
81
+ from django.urls import include, path
82
+
83
+ urlpatterns = [
84
+ ...
85
+ path("schema/", include("schematic.urls")),
86
+ ]
87
+ ```
88
+
89
+ Visit `http://localhost:8000/schema/` — your model graph will be there.
90
+
91
+ ## Security
92
+
93
+ The viewer is only accessible when `DEBUG = True`. In production (`DEBUG = False`) both the HTML view and the API return 404, making the URL appear non-existent.
94
+
95
+ To expose the viewer in production behind your own auth layer, set the `visible` option to a callable:
96
+
97
+ ```python
98
+ SCHEMATIC = {
99
+ "visible": lambda request: request.user.is_staff,
100
+ }
101
+ ```
102
+
103
+ ## Configuration
104
+
105
+ ```python
106
+ # settings.py (all optional — these are the defaults)
107
+ SCHEMATIC = {
108
+ "visible": lambda request: settings.DEBUG, # or any callable, or True/False
109
+ "include_apps": [], # empty = all apps
110
+ "exclude_apps": ["admin", "contenttypes", "sessions", "auth"],
111
+ "exclude_models": {}, # {"myapp": ["InternalModel"]}
112
+ "include_abstract": False,
113
+ "include_proxy": True,
114
+ }
115
+ ```
116
+
117
+ ## API
118
+
119
+ The schema is also available as JSON:
120
+
121
+ ```
122
+ GET /schema/api/
123
+ GET /schema/api/?apps=myapp,otherapp
124
+ ```
125
+
126
+ ## Development
127
+
128
+ ```bash
129
+ # Backend
130
+ pip install -e ".[dev]"
131
+ pytest
132
+
133
+ # Frontend
134
+ cd ui
135
+ npm install
136
+ npm run dev # Vite dev server with HMR
137
+ npm run build # Outputs to schematic/static/schematic/
138
+ ```
139
+
140
+ ## License
141
+
142
+ MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "django-schematic"
7
- version = "1.3.2"
7
+ version = "1.3.3"
8
8
  description = "Interactive schema visualization for Django projects — React Flow + force-directed layout"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -1,106 +0,0 @@
1
- # django-schematic
2
-
3
- Interactive schema visualization for Django projects.
4
-
5
- See all your models, fields, and relationships as an interactive, force-directed graph — directly in your browser. Zero Node.js required at runtime.
6
-
7
- ## Features
8
-
9
- - Force-directed layout with physics settle animation (drag-to-pin support)
10
- - Hierarchical layout via dagre
11
- - Click to expand/collapse field lists per model
12
- - App-based color coding
13
- - Show/hide models and apps via sidebar
14
- - Export/import view state as JSON
15
- - Export diagram as PNG
16
- - Clean JSON API endpoint (`GET /schema/api/`)
17
- - Django 5.x + Python 3.12+ only
18
-
19
- ## Exported PNG file with embeded SVG data
20
-
21
- This is an example output PNG file, that can be re-imported into djang-schematic
22
-
23
- <img width="1200" height="898" alt="DailyGrindStatus-Blog-schematic" src="https://github.com/user-attachments/assets/3fbeae62-68c1-45fe-9ae6-7b52ed77585e" />
24
-
25
-
26
-
27
- ## Quick Start
28
-
29
- ```bash
30
- pip install django-schematic
31
- ```
32
-
33
- Add to `INSTALLED_APPS`:
34
-
35
- ```python
36
- INSTALLED_APPS = [
37
- ...
38
- "schematic",
39
- ]
40
- ```
41
-
42
- Add to `urls.py`:
43
-
44
- ```python
45
- from django.urls import include, path
46
-
47
- urlpatterns = [
48
- ...
49
- path("schema/", include("schematic.urls")),
50
- ]
51
- ```
52
-
53
- Visit `http://localhost:8000/schema/` — your model graph will be there.
54
-
55
- ## Security
56
-
57
- The viewer is only accessible when `DEBUG = True`. In production (`DEBUG = False`) both the HTML view and the API return 404, making the URL appear non-existent.
58
-
59
- To expose the viewer in production behind your own auth layer, set the `visible` option to a callable:
60
-
61
- ```python
62
- SCHEMATIC = {
63
- "visible": lambda request: request.user.is_staff,
64
- }
65
- ```
66
-
67
- ## Configuration
68
-
69
- ```python
70
- # settings.py (all optional — these are the defaults)
71
- SCHEMATIC = {
72
- "visible": lambda request: settings.DEBUG, # or any callable, or True/False
73
- "include_apps": [], # empty = all apps
74
- "exclude_apps": ["admin", "contenttypes", "sessions", "auth"],
75
- "exclude_models": {}, # {"myapp": ["InternalModel"]}
76
- "include_abstract": False,
77
- "include_proxy": True,
78
- }
79
- ```
80
-
81
- ## API
82
-
83
- The schema is also available as JSON:
84
-
85
- ```
86
- GET /schema/api/
87
- GET /schema/api/?apps=myapp,otherapp
88
- ```
89
-
90
- ## Development
91
-
92
- ```bash
93
- # Backend
94
- pip install -e ".[dev]"
95
- pytest
96
-
97
- # Frontend
98
- cd ui
99
- npm install
100
- npm run dev # Vite dev server with HMR
101
- npm run build # Outputs to schematic/static/schematic/
102
- ```
103
-
104
- ## License
105
-
106
- MIT