Module eoxserver.core.config

This module provides an implementation of a system configuration that relies on different configuration files. It is used by eoxserver.core.system to store the current system configuration.

class eoxserver.core.config.Config

The Config class represents a system configuration. Internally, it relies on two configuration files:

  • the default configuration file (eoxserver/conf/default.conf)
  • the instance configuration file (conf/eoxserver.conf in the instance directory)

Configuration values are read from these files.

getConcurringConfigValues(section, key)

Returns a dictionary od concurring configuration parameter values. It may have two entries

  • default: the default configuration parameter value
  • instance: the instance configuration value

If there is no configuration parameter value defined in the respective configuration file, the entry is omitted.

The section and key arguments denote the parameter to be looked up.

getConfigValue(section, key)

Returns a configuration parameter value. The section and key arguments denote the parameter to be looked up. The value is searched for first in the instance configuration file; if it is not found there the value is read from the default configuration file.

getDefaultConfigValue(section, key)

Returns a configuration parameter default value (read from the default configuration file). The section and key arguments denote the parameter to be looked up.

getEOxSPath()

Returns the path to the EOxServer installation (not to the instance).

getInstanceConfigValue(section, key)

Returns a configuration parameter value as defined in the instance configuration file, or None if it is not found there. The section and key arguments denote the parameter to be looked up.

class eoxserver.core.config.ConfigFile(config_filename)

This is a wrapper for a configuration file. It is based on the Python builtin ConfigParser module.

get(section, key)

Return the configuration parameter value, or None if it is not defined.

The section argument denotes the section of the configuration file where to look for the parameter named key. See the ConfigParser module documentation for details on the config file syntax.