Skip to content

ini_file

Merge two .ini files into one.

config_to_dict(config: configparser.ConfigParser) -> dict

Convert a configparser object to a dictionary.

dict_to_config(
    dictionary: dict,
) -> configparser.ConfigParser

Convert a dict to a configparser object.

merge_ini_files(
    new_file: Path, existing_file: Path, merge_strategy: str
) -> None

Merge two INI files into one.

Raises:

MergeError

If something goes wrong

Parameters:

new_file

The path to the data file to merge

TYPE: Path

existing_file

The path to the data file to merge into and write out.

TYPE: Path

merge_strategy

How to do the merge

TYPE: str