weaver.processes.sources

Module Contents

weaver.processes.sources.DATA_SOURCES[source]

Data sources configuration.

Unless explicitly overridden, the configuration will be loaded from file as specified by weaver.data_sources setting. Following schema format is expected:

{
  "$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()[source]
weaver.processes.sources.get_default_data_source(data_sources)[source]
weaver.processes.sources.retrieve_data_source_url(data_source) → Text[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.
weaver.processes.sources.get_data_source_from_url(data_url)[source]