diff --git a/src/milla/util.py b/src/milla/util.py index db0c4a6..14e3b02 100644 --- a/src/milla/util.py +++ b/src/milla/util.py @@ -72,6 +72,8 @@ def read_config(filename, defaults=None): '''Parse an ini file into a nested dictionary :param string filename: Path to the ini file to read + :param dict defaults: (Optional) A mapping of default values that can be + used for interpolation when reading the configuration file :returns: A dictionary whose keys correspond to the section and option, joined with a dot character (.) @@ -101,6 +103,7 @@ def read_config(filename, defaults=None): This dictionary can be used to configure an :py:class:`~milla.Application` instance by using the ``update`` method:: + config = milla.util.read_config('superheros.ini') app = milla.Application(router) app.config.update(config) '''