fym.config.load

fym.config.load(path=None, as_dict=False)[source]

Load the configuration.

The configuration is empty FymNamespace unless any module loaded by the running script registers the configuration, or the script updates the configuration.

New in version 1.2.2.

Parameters
pathstr, optional

Absolute path where the requested configuration starts with. If the original configuration is defined as {"path.to.conf.requsted.conf": 1}, then load("path.to.conf") returns {"requested.conf: 1}. If not specified, then the whole configuration is returned.

as_dictboolean, optional

Return the configuration as a dict, or FymNamespace. (Default: False)

Returns
cfgdict or FymNamespace

Child configuration under path.