bingus.environ package¶
Submodules¶
bingus.environ.environ module¶
A Module for working with environment variables.
- bingus.environ.environ.require(var_name: str, allow_empty=False) str¶
Get an environment variable and return a sensible error if it doesn’t exist or is empy.
- Parameters
var_name – Name of the environment variable to get and require.
allow_empty – If True, an empty value for the environment variable is accepted.
- Returns
The value of the environment variable if it exists.
- Return type
str
- Raises
EmptyEnvironmentVariable – If the environment variable’s value is empty
MissingEnvironmentVariable – If the environment variable is not defined
bingus.environ.exceptions module¶
- exception bingus.environ.exceptions.EmptyEnvironmentVariable¶
Bases:
Exception
- exception bingus.environ.exceptions.MissingEnvironmentVariable¶
Bases:
Exception