common.configuration.utils
auto_cast
def auto_cast(value: str) -> Any
Parse and cast str value
to bool, int, float and json
F[f]alse and T[t]rue strings are cast to bool values
auto_config_fragment
def auto_config_fragment(value: str) -> Optional[DictStrAny]
Tries to parse config fragment assuming toml, yaml and json formats
Only dicts are considered valid fragments. None is returned when not a fragment
add_config_to_env
def add_config_to_env(
config: BaseConfiguration, sections: Tuple[str, ...] = ()) -> None
Writes values in configuration back into environment using the naming convention of EnvironProvider. Will descend recursively if embedded BaseConfiguration instances are found
add_config_dict_to_env
def add_config_dict_to_env(dict_: Mapping[str, Any],
sections: Tuple[str, ...] = (),
overwrite_keys: bool = False,
destructure_dicts: bool = True) -> None
Writes values in dict_ back into environment using the naming convention of EnvironProvider. Applies sections
if specified. Does not overwrite existing keys by default