IniProcessor

IniProcessor

class IniProcessor[source]

Bases: object

INI configuration file processor

Attributes

Note: attributes inherited from parent classes are not shown here, if any

section_strict

Sections and their strictness

kv_handlers

Handler for key/value pairs

Methods

process

Processes a configuration file

process_string

Processes a configuration file given as a string

List of members of IniProcessor

section_strict: Mapping[str, bool]

Sections and their strictness

kv_handlers: Mapping[str, configpile.handlers.KVHandler]

Handler for key/value pairs

process_string(ini_contents, state)[source]

Processes a configuration file given as a string

Parameters
  • ini_contents (str) – Contents of the INI file

  • state (State) – Mutable state to update

Return type

Optional[Err]

Returns

An optional error

process(ini_file_path, state)[source]

Processes a configuration file

Parameters
  • ini_path – Path to the INI file

  • state (State) – Mutable state to update

Return type

Optional[Err]

Returns

An optional error

__init__(section_strict, kv_handlers)