Skip to main content

django-describe

django-describe generates a report on the run-time configuration of a Django site after everything has been loaded or created and initialised- generating lists of installed apps, models registered with the Django Admin, urls served, etc. The reports are generated in json format.

The reports are the metadata for a site. You can use the reports for anything, but the reason django-describe was created was to feed the information into an LLM to generate tests.

Usage

Generate a complete report using the following:

python manage.py describe

Reports, by default, are written to the console, but you can save them to a file either by redirecting the output, or using the --output option:

python manage,py describe --output metadata/description.json

Output

django-describe generates the report in JSON format:

{
    "apps": [
        "django.contrib.admin",
        "django.contrib.auth",
        "django.contrib.contenttypes",
        "django.contrib.sessions",
        "django.contrib.messages",
        "django.contrib.staticfiles",
        "describe"
    ],
    "models": [
        "admin.logentry",
        "auth.permission",
        "auth.group",
        "auth.user",
        "contenttypes.contenttype",
        "sessions.session"
    ],
    "settings": {
        "ABSOLUTE_URL_OVERRIDES": {},
        "ADMINS": [],
        "ALLOWED_HOSTS": [],
        "APPEND_SLASH": true,
        "AUTHENTICATION_BACKENDS": [
            "django.contrib.auth.backends.ModelBackend"
        ],
        ...
    }
}

Note: The report normally does not include information from dependencies. They were only included as the django-describe app does not include any models.

Install

You can use either pip or uv to download the package from PyPI and install it into a virtualenv:

pip install django-describe

or:

uv add django-describe

Update INSTALLED_APPS in your Django setting:

INSTALLED_APPS = [
    ...
    "describe",
]

Demo

If you check out the code from the repository there is a fully functioning, but minimal Django site, which you can used to see how the management command works.

git clone git@github.com:StuartMacKay/django-describe.git
cd django-describe

Create the virtual environment:

uv venv

Activate it:

source .venv/bin/activate

Install the requirements:

uv sync

Run the database migrations:

python manage.py migrate

Now, run the management command to generate the report:

python manage.py describe --output metadata.json

Project Information

The app is tested on Python 3.12+, and officially supports Django 5.2 LTS, and later versions.

License

django-describe is released under the terms of the MIT license.

Metadata

Release files for django-describe 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-describe 0.0.3
File Size Uploaded
django_describe-0.0.3.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-describe 0.0.3
File Interpreter ABI Platform
django_describe-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / django_describe-0.0.3.tar.gz

Download URL django_describe-0.0.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
549f8d2ae24de37496aabe07b4ba71ed4a33b82c58fe1f65ca198d570ad04861
BLAKE2b-256 checksum
How to use checksums
7469dba8d8630da19b3fb7411ed8d079b1d69dc3c5e923ba1581cced6c553642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / django_describe-0.0.3-py3-none-any.whl

Download URL django_describe-0.0.3-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f993b8de4ffd0fead69c808f0cce4285ad918fa6653afacfd5b8d61f36bf7f08
BLAKE2b-256 checksum
How to use checksums
439a0e1addefbaa402ac13e291b7316450afb05ad7a0c5d3296284c720924b92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page