Skip to main content

DjEnv: Django + Environment

Load Django Settings Directly from Environmental Variables

features

  • modify django configuration without modifying source code
  • prevent hard-coding of Django settings
  • works great with Docker

install

with pip

pip install djenv

with pipenv

pipenv install djenv

basic usage

# inside settings.py

# import settings from environment
from djenv.settings import *

Prepend Settings with DJANGO_ to import them. For example:

DJANGO_DEBUG=False python3 manage.py runserver

Will set DEBUG=False in the settings.py

advanced usage

You can also replace nested settings like DATABASES by setting a JSON

DJANGO_DATABASES='{ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "db.sqlite3" } }'  python3 manage.py runserver

Metadata

Release files for djenv 0.0.6

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

Source distribution (sdist)

Source distribution for djenv 0.0.6
File Size Uploaded Provenance Actions
djenv-0.0.6.tar.gz 9.4 kB Without provenance Details for djenv-0.0.6.tar.gz

Release files / djenv-0.0.6.tar.gz

Download URL djenv-0.0.6.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7967e97389a5c4f702663578efaabc51e41983c23c09adce675e712e31f21d99
BLAKE2b-256 checksum
How to use checksums
c4a33b72edf1dd7485366bd374a133ed93c5b5b382e536d424508e56ece26945
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for djenv 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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