Skip to content

Ini File Provider

Wraps ini library to read and write.

Hooks

Type Description Return
ini Hook for reading and writing ini files. Hook reads from path if no data field is provided, otherwise it writes the data to path. Union[dict, str, list]
ini_decode Hook for decoding an ini string to a dict. dict
ini_encode Hook for converting a dict to an ini encoded string. str

Examples

Read ini

Read a ini file into a key

compact->: ini path/to/file.ini
expanded:
  ->: ini
  path: path/to/file.ini

Write ini

Read a ini file into a key

stuff:
  and: things
compact->: ini path/to/file.ini "{{stuff}}"
expanded:
  ->: ini
  path: path/to/file.ini
  contents: "{{ stuff }}"