A simple Django env var checker
Project description
django-env-checker
django-env-checker is a simple yet effective tool to enforce required environment variables in your Django project. If any required environment variables are missing, the application will raise an error.
Installation
pip install django-env-checker
settings.py
Add env_check to your INSTALLED_APPS
Define the list of required environment variables:
REQUIRED_ENV_VARS = [
'SECRET_KEY',
'API_KEY',
'PGPASSWORD'
]
Run your application with DEBUG = False to activate the environment variable checks. If any required environment variable is missing, the app will raise an error on startup.
Behavior
The environment variable validation only runs when DEBUG is set to False.
If a required variable is missing, the startup will fail immediately, preventing the app from running in an unsafe state.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_env_checker-0.2.0.tar.gz.
File metadata
- Download URL: django_env_checker-0.2.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3046ba93117ae1f46001f047a17fa8dbe2a7f80c63343f7a8b7ec3d581f4ff33
|
|
| MD5 |
bd50ba12fb9803a5618e5fa1030d555e
|
|
| BLAKE2b-256 |
6a2709c9f0cc3919f1f559c1b3497148ca5e87eaf1d9a93505ef68f9773626d6
|
File details
Details for the file django_env_checker-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_env_checker-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89101815731a53fe9b73cce24cfef7af910ca876aacce8c832ef544d9bc6a3b6
|
|
| MD5 |
6efc52ea929e9b99b46a8d7e1bdacf1d
|
|
| BLAKE2b-256 |
0858b1275412ccf17bb0d6f6782f77835384dec66442d44aa43f833e59b89f48
|