Skip to main content

Yet another Django env

Project description

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yade-0.1.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yade-0.1.3-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file yade-0.1.3.tar.gz.

File metadata

  • Download URL: yade-0.1.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for yade-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1c8e94635647925b6d741b2211b60c118a75ee31cb5d612560f64875685ea4bc
MD5 59bcbaa126d34895b2891864176a661a
BLAKE2b-256 87eb4876d089491be5d5dcff23492233ea18f953e5eb33f050741337fe997124

See more details on using hashes here.

File details

Details for the file yade-0.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: yade-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for yade-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a461d16abb2d17b5de8d82f48907101fd4947bd72a62e04b2a9a0d4113de48b2
MD5 7563dd94d0d731fdf62d518b876d2f2d
BLAKE2b-256 f3bd8b4004170efcf9eb7483e660a94c72417fba6ed220d708c25a69b09f48b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page