Module Contents

class weaver.config.WeaverConfiguration[source]

Configuration mode for which the Weaver instance should operate to provide different functionalities.

ADES = 'ADES'[source]
EMS = 'EMS'[source]
HYBRID = 'HYBRID'[source]
class weaver.config.WeaverFeature[source]

Features enabled accordingly to different combinations of WeaverConfiguration modes.

weaver.config.WEAVER_DEFAULT_INI_CONFIG = 'weaver.ini'[source]
weaver.config.WEAVER_DEFAULT_DATA_SOURCES_CONFIG = 'data_sources.yml'[source]
weaver.config.WEAVER_DEFAULT_REQUEST_OPTIONS_CONFIG = 'request_options.yml'[source]
weaver.config.WEAVER_DEFAULT_WPS_PROCESSES_CONFIG = 'wps_processes.yml'[source]
weaver.config.get_weaver_configuration(container: weaver.typedefs.AnySettingsContainer) str[source]

Obtains the defined operation configuration mode.


one value amongst weaver.config.WEAVER_CONFIGURATIONS.

weaver.config.get_weaver_config_file(file_path: Optional[str], default_config_file: str, generate_default_from_example: bool = True) str[source]

Validates that the specified configuration file can be found, or falls back to the default one.

Handles ‘relative’ paths for settings in WEAVER_DEFAULT_INI_CONFIG referring to other configuration files. Default file must be one of WEAVER_DEFAULT_CONFIGS.

If both the specified file and the default file cannot be found, default file under WEAVER_DEFAULT_INI_CONFIG is auto-generated from the corresponding .example file if generate_default_from_example is True. If it is False, an empty string is returned instead without generation since no existing file can be guaranteed, and it is up to the caller to handle this situation as it explicitly disabled generation.

  • file_path – path to a configuration file (can be relative if resolvable or matching a default file name)

  • default_config_file – one of WEAVER_DEFAULT_CONFIGS.

  • generate_default_from_example – enable fallback copy of default configuration file from corresponding example.


absolute path of the resolved file.

weaver.config.includeme(config: pyramid.config.Configurator) None[source]