Welcome to INI’s documentation!

INI allows you easiely to load and dump files in ini format.

ini.load(ini_file, section_seperator='.')

Parses the given ini_file which has to be an iterable over the lines of the ini formatted file or string and returns a nested OrderedDict. The OrderedDict holds the items in the order they are in the given ini_file.

If you have nested sections this function will parse and nest them appropriately. Just specify the character you use with the section_seperator keyword argument.

ini.dump(d, ini_file, section_seperator='.')

Dumps the arbitary deeply nested dictionary d to the given ini_file in ini format.

Use the section_seperator keyword argument to specify which character should be used to join nested sections.

Helpers

class ini.OrderedDict(*args, **kwargs)

A dictionary which stores items in order of their insertion.

popitem(last=True)
Pops and returns the last item from the dict if last is True otherwise the first item will be used.

Table Of Contents

This Page