Open taranlu-houzz opened 3 months ago
if you set envvar_prefix=False
Dynaconf will load all the envvars regardless of prefix, is that what you are looking for?
@rochacbruno Not quite. Right now, if I enable envvar_prefix
, it will detect PREFIX_MY_VAR=123
in the environment and store it as MY_VAR
, but if I set PREFIX_MY_VAR = "123"
in the settings file, it will pick that up with that name including the prefix, so I will have dynaconf_obj.MY_VAR
and dynacof_obj.PREFIX_MY_VAR
.
Basically, I would like to have the flexibility to specify:
PREFIX_MY_VAR
in the environmentPREFIX_MY_VAR
in the config fileMY_VAR
in the config file
And have them all refer to the same config setting.Ok, got it now.
We have prefix filtering, but that will just apply the same filtering done to envvars to any source file.
It looks like the feature you are looking for is the ability to set alias #1137
Lets keep this issue open to be considered when implementing the new alias system.
Is your feature request related to a problem? Please describe. I prefer to have the env var names exactly match the names used in the config file and application code.
Describe the solution you'd like
settings_files_strip_prefix
)envvar_prefix
, strip that (dealing with the following underscore would probably require additional logic or at least clear documentation).PREFIX_MY_VAR=123
setting.toml
:PREFIX_MY_VAR = "123"
settings.toml
:MY_VAR = "123"
dynaconf_obj.MY_VAR
Describe alternatives you've considered This isn't an essential feature, just a nice to have.
Additional context Add any other context or screenshots about the feature request here.