Configuring Dynaconf

Dynaconf can be configured through variables suffixed with _FOR_DYNACONF those settings can be used to change various dynaconf defaults and behaviors.

Variable Type Usage default envvar example
PROJECT_ROOT str Directory to look for settings “.” PROJECT_ROOT_FOR_DYNACONF=”/tmp”
SETTINGS_MODULE str List of comma separated files to load List of supportes files SETTINGS_MODULE_FOR_DYNACONF= “config.toml,settings.yaml”
ENV str Working environment “development” ENV_FOR_DYNACONF=production
GLOBAL_ENV str Prefix used for exporting parameters as env vars “DYNACONF” GLOBAL_ENV_FOR_DYNACONF=MYPROGRAM
SILENT_ERRORS bool Loading errors should be silenced true SILENT_ERRORS_FOR_DYNACONF=false
FRESH_VARS list A list of vars to be re-loaded on every access [] FRESH_VARS_FOR_DYNACONF=[“HOST”, “PORT”]
DEBUG_LEVEL str Upper case logging level NOTSET DEBUG_LEVEL_FOR_DYNACONF=DEBUG
DOTENV_PATH str defines where to look for .env file PROJECT_ROOT DOTENV_PATH_FOR_DYNACONF=”/tmp/.env”)
DOTENV_OVERRIDE bool .env should override the exported envvars false` DOTENV_OVERRIDE_FOR_DYNACONF=true
AUTO_CAST bool @casting like @int is parsed true DOTENV_OVERRIDE_FOR_DYNACONF=false
REDIS_ENABLED bool Redis loader is enabled false REDIS_ENABLED_FOR_DYNACONF=true
VAULT_ENABLED bool Vault server is enabled false VAULT_ENABLED_FOR_DYNACONF=true
REDIS_HOST str Redis server address localhost REDIS_HOST_FOR_DYNACONF=”localhost”
REDIS_PORT int Redis port 6379 REDIS_PORT_FOR_DYNACONF=8899
REDIS_DB int Redis DB 0 REDIS_DB_FOR_DYNACONF=1
VAULT_URL str Vault URL http:// localhost :8200 VAULT_URL_FOR_DYNACONF=”http://server/8200
VAULT_TOKEN str vault token None VAULT_TOKEN_FOR_DYNACONF=myroot
VAULT_CERT str vault cert/pem file path None VAULT_CERT_FOR_DYNACONF=”~/.ssh/key.pem”
VAULT_VERIFY bool vault should verify None VAULT_VERIFY_FOR_DYNACONF=true
dynaconf.default_settings

alias of dynaconf.default_settings