Skip to main content

django management command to dump an ordered list of settings

Project description

django-settings-enumerate

Django management command that dumps all settings in a flattened dot-notation format with automatic sensitive-value hashing.

Installation

pip install django-settings-enumerate

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    "django_settings_enumerate",
]

Usage

# Dump all settings (flattened text)
./manage.py enumerate_settings

# JSON output (nested, unchanged structure)
./manage.py enumerate_settings --format json

# Filter by prefix
./manage.py enumerate_settings --filter DATABASE

# Show sensitive values instead of sha256 hashes
./manage.py enumerate_settings --show-sensitive

# Diff against a previous dump
./manage.py enumerate_settings > baseline.txt
./manage.py enumerate_settings --diff baseline.txt

Output format

Text output uses flattened dot-notation with JSON-encoded leaf values:

ALLOWED_HOSTS[0] = "*"
DATABASES.default.ENGINE = "django.db.backends.postgresql"
DATABASES.default.HOST = "localhost"
DEBUG = true
SECRET_KEY = "d4e5f6..."

Sensitive keys matching API|TOKEN|KEY|SECRET|PASS|SIGNATURE are replaced with their sha256 hash unless --show-sensitive is passed.

Requirements

  • Python >= 3.9
  • Django >= 4.2

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_settings_enumerate-0.1.1.tar.gz (174.6 kB view details)

Uploaded Source

Built Distribution

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

django_settings_enumerate-0.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file django_settings_enumerate-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django_settings_enumerate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ae062a2998f7f19ad3c64a018bd006c71badf1a126deba9f17a14f4f078a3a9
MD5 a10e89057d63270451952c3bd1e4fd96
BLAKE2b-256 f89f17fd422d9bbdd268d242d4288a9b585100da05d8bf330a034f94e8dfcf7b

See more details on using hashes here.

File details

Details for the file django_settings_enumerate-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_settings_enumerate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71bc6635b2e88725b0fc25f86ccdefea3b044751f927649a1df664aa88ad6935
MD5 726b774f18455d3d2e34fbb878386160
BLAKE2b-256 1495a1525a18da372d6718983047791ba1141b83062223b270dd6f999094fae2

See more details on using hashes here.

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