def read_config_from_yaml(path_config):
    :param path_config: Path to the config file
    # 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
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter