ConfigInit.__init__

ConfigInit.__init__#

ConfigInit.__init__(package_name: str, configs: Dict[str, str | dict | Callable], config_directory: str | None = None, config_directory_file_path: str | None = None)[source]#

Initialise the ConfigInit instance.

Parameters:
  • package_name – package name, used to derive the standard config directory

  • configs

    dict mapping config filename to its template. Template can be:

    • dict — written as a new config file with those values

    • str — path to an existing file that is copied to the target location

    • callable — called at init time with no arguments, must return a dict

  • config_directory – optional config directory path (i.e. path where the config files will be stored). If not provided, defaults to the path string stored in the config_directory_file_path.

  • config_directory_file_path – optional path to the config directory file (i.e. path to the file which stores the config_directory path). If not provided, defaults to ~/.processor_tools/config_directory_<package_name>.txt.