pyrit.common.get_required_value#
- get_required_value(*, env_var_name: str, passed_value: str) str [source]#
Gets a required value from an environment variable or a passed value, prefering the passed value
If no value is found, raises a KeyError
- Parameters:
- Returns:
The passed value if provided, otherwise the value from the environment variable.
- Return type:
- Raises:
ValueError – If neither the passed value nor the environment variable is provided.