Skip to main content

Yet another Django env (yade)

Simple library to set Django settings through environment variables in a way, inspired by ASP.NET Core.

Examples of variables, which will affect settings:

DJANGO__STATIC_URL  # Just string variable
DJANGO__REST_FRAMEWORK__PAGE_SIZE  # Dict value
DJANGO__AUTH_PASSWORD_VALIDATORS__0__NAME  # List value

True/False or ints (0,1,2...) values of env variables will be converted to python type (bool or int). Json like arrays like [1, 2, 3]are supported too.

Installation

pip install yade

Usage

In settings.py:

from yade import update_settings_from_env

ALLOWED_HOSTS = ['*']
...  # Your settings here

update_settings_from_env(locals())
# End of file

Notice: this work only in modules, not in functions!

Release files for yade 0.1.3

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

Source distribution (sdist)

Source distribution for yade 0.1.3
File Size Uploaded
yade-0.1.3.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yade 0.1.3
File Interpreter ABI Platform
yade-0.1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 6.9 kB

Release files / yade-0.1.3.tar.gz

Download URL yade-0.1.3.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c8e94635647925b6d741b2211b60c118a75ee31cb5d612560f64875685ea4bc
BLAKE2b-256 checksum
How to use checksums
87eb4876d089491be5d5dcff23492233ea18f953e5eb33f050741337fe997124
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / yade-0.1.3-py2.py3-none-any.whl

Download URL yade-0.1.3-py2.py3-none-any.whl
Size 3.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a461d16abb2d17b5de8d82f48907101fd4947bd72a62e04b2a9a0d4113de48b2
BLAKE2b-256 checksum
How to use checksums
f3bd8b4004170efcf9eb7483e660a94c72417fba6ed220d708c25a69b09f48b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

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