getenv_bool#
- caf.toolkit.arguments.getenv_bool(name, default)[source]#
Get environment variable and converts to a boolean.
Normalizes the variable value by converting to lowercase and stripping whitespace before bool conversion.
- Parameters:
- Returns:
True for: ‘true’, ‘yes’, ‘y’ or ‘1’. False for: ‘false’, ‘no’, ‘n’ or ‘0’.
- Return type:
- Raises:
ValueError – If the environment variable has an unexpected value.