Metadata-Version: 2.4
Name: django-env-checker
Version: 0.2.0
Summary: A simple Django env var checker
Home-page: https://github.com/RickVerbon/django-env-checker
Author: Rick Verbon
Author-email: rick89@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: Framework :: Django
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-python
Dynamic: summary

# 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

```bash
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.
