| |
- builtins.object
-
- MaukaConfig
class MaukaConfig(builtins.object) |
|
MaukaConfig(config_dict: Dict[str, Union[str, int, float, bool]])
An instance of a Mauka config that will throw when a key doesn't exist (unless a default is provided) |
|
Methods defined here:
- __getitem__(self, item)
- __init__(self, config_dict: Dict[str, Union[str, int, float, bool]])
- Initialize self. See help(type(self)) for accurate signature.
- get(self, key: str, default: Union[str, int, float, bool] = None) -> Union[str, int, float, bool]
- Returns the value in the configuration associated with this key.
:param key: The key to search for.
:param default: The default value to provide if the key is not in the configuration.
:return: Either the configuration value, the default value, or throw.
- replace_env(self, config_dict: Dict[str, Union[str, int, float, bool]]) -> Dict[str, Union[str, int, float, bool]]
- This function parses values from the config that are strings and start with a question mark "?" and replaces
them with the value set in the environment using the name of everything after the question mark.
:param config_dict: The configuration dictionary.
:return: A configuration dictionary with environment variables substituted for marked config entries.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |