django-diagram
Generate an Entity Relationship Diagram for a Django project in Mermaid format
What it is and what it does
django-diagram is a command-line tool that reads your Django project's models and generates an Entity Relationship Diagram in Mermaid format. It introspects your Django settings and model definitions, then outputs a text-based diagram showing tables and their relationships. You run it as a Django management command by pointing it to your settings module, optionally filtering to a single app or writing to a file instead of stdout.
The tool is a thin wrapper around Django's model introspection; it has no external dependencies beyond Django itself. It's useful for documenting database schemas or quickly visualizing how your models relate to each other. However, the project is dormant—the single release was in February 2023 and has not been updated since, so it may not work with recent Django versions or handle all modern model patterns.
Use it for:
- Generate a quick visual reference of your Django app's database schema for documentation or team onboarding.
- Export a Mermaid diagram of a single Django app's models to embed in README or design docs.
- Verify model relationships and foreign keys at a glance without manually reading model code.
- Create a baseline ER diagram when inheriting or auditing an existing Django project.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates Entity Relationship Diagrams in Mermaid format from Django project models by introspecting your Django configuration.
Yes, if you need a one-off diagram of a Django project's models and are comfortable with a dormant tool. The install is frictionless and it does what it claims. No, if you depend on ongoing maintenance or need compatibility with recent Django versions—the last update was over two years ago. Verify the unclear license before using in production or commercial work.
Install
django-diagram on PyPI
pip
pip install django-diagramuv
uv add django-diagrampoetry
poetry add django-diagramInstalling django-diagram
Before you install
Low friction: pure Python wheel with only django as a runtime dependency. Maintenance is dormant—last commit was 2024-01-04 and no updates since the single 0.0.1 release on 2023-02-18, so expect no bug fixes or Django version compatibility updates.
License in practice
License is marked 'All Rights Reserved' with no SPDX identifier, making its legal status unclear. Verify with the repository or author before using in commercial or redistributed work.
Quickstart
pip install django-diagram
python -m django_diagram --settings=myproject.settings --output=diagram.txt
Requires DJANGO_SETTINGS_MODULE environment variable or --settings argument pointing to a valid Django settings module.
Verify before relying
- Whether 'All Rights Reserved' license permits use in proprietary or open-source projects—contact author or check repository for clarification.
- Compatibility with Django versions released after 2024-01-04 (LTS releases 4.2+, 5.0+).
- Whether the tool handles complex model relationships (many-to-many, through tables, abstract models) correctly.
Package facts
| License | All Rights Reserved (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | dormant — 1,273 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,561/month — #13,853 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_diagram-0.0.1-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
paracelsusParacelsus generates Entity Relationship…
permissive · top 15,000 on PyPI
mermaid-pymermaid-py provides a Python interface to the…
permissive · top 15,000 on PyPI
eralchemyGenerates Entity Relation (ER) diagrams from…
permissive · top 5,000 on PyPI
sqlalchemy-schemadisplayGenerates entity-relationship and UML diagrams…
permissive · top 15,000 on PyPI
sphinxcontrib-mermaidEmbeds Mermaid diagrams (flowcharts, sequence…
permissive · top 5,000 on PyPI
mkdocs-mermaid2-pluginA MkDocs plugin that renders Mermaid diagram…
permissive · top 5,000 on PyPI
django-modeltreeProvides a simplified interface for navigating…
permissive · top 15,000 on PyPI
plantumlGenerates UML diagrams from text markup by…
permissive · top 15,000 on PyPI
mermaid-builderProgrammatically generates MermaidJS diagram…
permissive · top 15,000 on PyPI
mkdocs-kroki-pluginA MkDocs plugin that converts Kroki diagram…
permissive · top 15,000 on PyPI