Read yaml file

PHOTO EMBED

Thu Aug 17 2023 08:31:28 GMT+0000 (Coordinated Universal Time)

Saved by @evolutiongts #args

def read_config_from_yaml(path_config):
    '''
    :param path_config: Path to the config file
    :return:
    '''
    # Read the content of the yaml file
    config_data = {}

    with open(path_config, 'r') as file:
        data = yaml.safe_load(file)
        # Extract key-value pairs from the nested 'config' key

    return data
content_copyCOPY