weaver.processes.sources
Module Contents
- weaver.processes.sources.DATA_SOURCES: weaver.typedefs.DataSourceConfig[source]
Data sources configuration.
Unless explicitly overridden, the configuration will be loaded from file as specified by``weaver.data_sources`` setting. Following JSON schema format is expected (corresponding YAML also supported):
{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Data Sources", "type": "object", "patternProperties": { ".*": { "type": "object", "required": [ "netloc", "ades" ], "additionalProperties": false, "properties": { "netloc": { "type": "string", "description": "Net location of a data source url use to match this data source." }, "ades": { "type": "string", "description": "ADES endpoint where the processing of this data source can occur." }, "default": { "type": "string", "description": "True indicate that if no data source match this one should be used (Use the first default)." } } } } }
- weaver.processes.sources.fetch_data_sources(container: weaver.typedefs.AnySettingsContainer | None = None) weaver.typedefs.DataSourceConfig [source]
- weaver.processes.sources.get_default_data_source(data_sources: weaver.typedefs.DataSourceConfig) str [source]
- weaver.processes.sources.retrieve_data_source_url(data_source: str | None, container: weaver.typedefs.AnySettingsContainer | None = None) str [source]
Finds the data source URL using the provided data source identifier.
- Returns:
found URL, ‘default’ data source if not found, or current weaver WPS Rest API base URL if None.