Draco features an integreted configuration subsystem. This subsystem is used by Draco itself to read its configuration and can be used by the user too.
The configuration subsystem is accessed using the global instance of the
Config class. This instance is stored in the current module under
the name config
. The following code fragment illustrates this.
The Config object presents the configuration variables as a namespace. The namespace is read-only, configuration variables can be changed only by editing the configuration file. A small example:
from draco.config import config do_order = config.get('Ordering', 1)
) |
The public methods of Config are:
scope) |
'__system__'
.