Skip to main content

utils.env

get_env_value

def get_env_value(key: str, target_type: type) -> typing.Any

Gets an environment variable from the system, converting it to a specific type.

Arguments:

  • key - The environment variable key.
  • target_type - The target type.

Returns:

The converted value.