(styles_by_target_layer: Dict[str, dict], output_directory: str)
Creates the qml files that can be applied to qgis layers.
    :param styles_by_target_layer:
    :param output_directory:
    :return:
Creates the qml files that can be applied to qgis layers.
    :param styles_by_target_layer:
    :param output_directory:
    :return:
Creates the qml files that can be applied to qgis layers . : param styles_by_target_layer : : param output_directory : : return :
def write_styles(styles_by_target_layer: Dict[str, dict], output_directory: str) -> None:
    """
    Creates the qml files that can be applied to qgis layers.
    :param styles_by_target_layer:
    :param output_directory:
    :return:
    """

    if os.path.isdir(output_directory):
        for the_file in os.listdir(output_directory):
            file_path = os.path.join(output_directory, the_file)
            if os.path.isfile(file_path) and file_path.lower().endswith(".qml"):
                os.unlink(file_path)

    for layer_name in styles_by_target_layer:
        style = styles_by_target_layer[layer_name]
        create_style_file(output_directory=output_directory, layer_style=style)
def write_styles ( styles_by_target_layer : Dict [ str , dict ] , output_directory : str ) -> None : if os . path . isdir ( output_directory ) : for the_file in os . listdir ( output_directory ) : file_path = os . path . join ( output_directory , the_file ) if os . path . isfile ( file_path ) and file_path . lower ( ) . endswith ( ".qml" ) : os . unlink ( file_path ) for layer_name in styles_by_target_layer : style = styles_by_target_layer [ layer_name ] create_style_file ( output_directory = output_directory , layer_style = style )