Skip to main content

No project description provided

Project description

django-app-tree

This is a dependency checking / generating tool that highlights dependencies between apps.

One type of dependency is that models from app A have a reference to a model in app B.

Another one is simply where code is called.

The tool is a Django management command that can simply be called by

./manage.py dependency_tree

especially

./manage.py dependency_tree --help

might be helpful.

The final output is a graphviz file between the "-----------" lines

Just copy it into an empty file and run the graphviz (https://graphviz.org/) compiler, e.g. with dot dependencies.dot -Tpdf -o test.pdf to generate a PDF.

Example commands are:

./manage.py dependency_tree --contains-app=test --with-labels

to show all relations of the "test" app (from / to) and add the name of the models, functions or classes as labels.

Or:

./manage.py dependency_tree --from-app=example --with-labels

to show which apps the "example" app calls code from.

To get the full picture of all relations, just call:

./manage.py dependency_tree --with-labels

BUT beware... you might not like what you see :)

Development

Install the pre-commit hooks:

pre-commit install
pre-commit install --hook-type commit-msg
pre-commit install --hook-type pre-push

Local python setup:

python3.10 -m venv .
source ./bin/activate
pip install --upgrade pip
pip install --editable .[dev,test,docs]

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_app_tree-0.1.0.tar.gz (18.2 kB view hashes)

Uploaded Source

Built Distribution

django_app_tree-0.1.0-py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page