# 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
```bash
pip install djenv
```
### with pipenv
```bash
pipenv install djenv
```
# basic usage
```python3
# inside settings.py
# import settings from environment
from djenv.settings import *
```
Prepend Settings with `DJANGO_` to import them. For example:
```bash
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
```bash
DJANGO_DATABASES='{ "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "db.sqlite3" } }' python3 manage.py runserver
```
Raw data
{
"_id": null,
"home_page": "https://github.com/DanielJDufour/djenv",
"name": "djenv",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "auto,automate,conf,configure,env,environment,django,loader,settings",
"author": "Daniel J. Dufour",
"author_email": "daniel.j.dufour@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c4/a3/3b72edf1dd7485366bd374a133ed93c5b5b382e536d424508e56ece26945/djenv-0.0.6.tar.gz",
"platform": null,
"description": "# DjEnv: Django + Environment\nLoad Django Settings Directly from Environmental Variables\n\n# features\n- modify django configuration without modifying source code\n- prevent hard-coding of Django settings\n- works great with Docker\n\n# install\n### with pip\n```bash\npip install djenv\n```\n### with pipenv\n```bash\npipenv install djenv\n```\n\n# basic usage\n```python3\n# inside settings.py\n\n# import settings from environment\nfrom djenv.settings import *\n```\n\nPrepend Settings with `DJANGO_` to import them. For example:\n```bash\nDJANGO_DEBUG=False python3 manage.py runserver\n```\nWill set DEBUG=False in the settings.py\n\n# advanced usage\nYou can also replace nested settings like DATABASES by setting a JSON\n```bash\nDJANGO_DATABASES='{ \"default\": { \"ENGINE\": \"django.db.backends.sqlite3\", \"NAME\": \"db.sqlite3\" } }' python3 manage.py runserver\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "DjEnv (Django + Environment): Load Django Settings from Environmental Variables",
"version": "0.0.6",
"project_urls": {
"Download": "https://github.com/DanielJDufour/djenv/tarball/download",
"Homepage": "https://github.com/DanielJDufour/djenv"
},
"split_keywords": [
"auto",
"automate",
"conf",
"configure",
"env",
"environment",
"django",
"loader",
"settings"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c4a33b72edf1dd7485366bd374a133ed93c5b5b382e536d424508e56ece26945",
"md5": "86d6f1d5361f62a948f6f51678f5d04f",
"sha256": "7967e97389a5c4f702663578efaabc51e41983c23c09adce675e712e31f21d99"
},
"downloads": -1,
"filename": "djenv-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "86d6f1d5361f62a948f6f51678f5d04f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9392,
"upload_time": "2023-10-29T12:59:28",
"upload_time_iso_8601": "2023-10-29T12:59:28.590711Z",
"url": "https://files.pythonhosted.org/packages/c4/a3/3b72edf1dd7485366bd374a133ed93c5b5b382e536d424508e56ece26945/djenv-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-29 12:59:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DanielJDufour",
"github_project": "djenv",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "djenv"
}