pyrit.common.get_non_required_value

pyrit.common.get_non_required_value#

get_non_required_value(*, env_var_name: str, passed_value: str) str[source]#

Gets a non-required value from an environment variable or a passed value, prefering the passed value.

Parameters:
  • env_var_name (str) – The name of the environment variable to check.

  • passed_value (str) – The value passed to the function.

Returns:

The passed value if provided, otherwise the value from the environment variable.

If no value is found, returns an empty string.

Return type:

str