Gets the value of a given key from the given .env

    If the .env path given doesn't exist, fails
    :param dotenv_path: path
    :param key_to_get: key
    :param verbose: verbosity flag, raise warning if path does not exist
    :return: value of variable from environment file or None

def get_key(dotenv_path, key_to_get, verbose=False):
    """
    Gets the value of a given key from the given .env

    If the .env path given doesn't exist, fails
    :param dotenv_path: path
    :param key_to_get: key
    :param verbose: verbosity flag, raise warning if path does not exist
    :return: value of variable from environment file or None
    """
    key_to_get = str(key_to_get)
    if not os.path.exists(dotenv_path):
        if verbose:
            warnings.warn(f"Can't read {dotenv_path}, it doesn't exist.")
        return None
    dotenv_as_dict = dotenv_values(dotenv_path)
    if key_to_get in dotenv_as_dict:
        return dotenv_as_dict[key_to_get]
    else:
        if verbose:
            warnings.warn(f"key {key_to_get} not found in {dotenv_path}.")
        return None