diggrtoolbox.configgr package

Submodules

diggrtoolbox.configgr.configgr module

The Configgr provides a simple and easy to use configuration method.

Author: F. Rämisch <raemisch@ub.uni-leipzig.de> Copyright: Universitätsbibliothek Leipzig, 2018 License: GNU General Public License v3

class diggrtoolbox.configgr.configgr.Configgr(config_filename, inspect_locals=True, try_lower_on_fail=True)[source]

Bases: object

Developers define a default configuration for their programs using constants in the source . These constants are inspected, upon instanciation, and saved into the config object. The config file is read, and all settings are imported too. Constants are overwritten in the config, out of course are still usable in the program config.

This results in the fact, that you can set a default behaviour in the source code, let the user configure a setting in a config file, but comment it out upon shipping, to indicate that configuration of this setting is not required.

Module contents

class diggrtoolbox.configgr.Configgr(config_filename, inspect_locals=True, try_lower_on_fail=True)[source]

Bases: object

Developers define a default configuration for their programs using constants in the source . These constants are inspected, upon instanciation, and saved into the config object. The config file is read, and all settings are imported too. Constants are overwritten in the config, out of course are still usable in the program config.

This results in the fact, that you can set a default behaviour in the source code, let the user configure a setting in a config file, but comment it out upon shipping, to indicate that configuration of this setting is not required.