weaver.wps

Module Contents

weaver.wps.LOGGER[source]
weaver.wps._get_settings_or_wps_config(container: AnySettingsContainer, weaver_setting_name: AnyStr, config_setting_section: AnyStr, config_setting_name: AnyStr, default_not_found: AnyStr, message_not_found: AnyStr) → AnyStr[source]
weaver.wps.get_wps_path(container: AnySettingsContainer) → AnyStr[source]

Retrieves the WPS path (without hostname). Searches directly in settings, then weaver.wps_cfg file, or finally, uses the default values if not found.

weaver.wps.get_wps_url(container: AnySettingsContainer) → AnyStr[source]

Retrieves the full WPS URL (hostname + WPS path). Searches directly in settings, then weaver.wps_cfg file, or finally, uses the default values if not found.

weaver.wps.get_wps_output_dir(container: AnySettingsContainer) → AnyStr[source]

Retrieves the WPS output directory path where to write XML and result files. Searches directly in settings, then weaver.wps_cfg file, or finally, uses the default values if not found.

weaver.wps.get_wps_output_path(container: AnySettingsContainer) → AnyStr[source]

Retrieves the WPS output path (without hostname) for staging XML status, logs and process outputs. Searches directly in settings, then weaver.wps_cfg file, or finally, uses the default values if not found.

weaver.wps.get_wps_output_url(container: AnySettingsContainer) → AnyStr[source]

Retrieves the WPS output URL that maps to WPS output directory path. Searches directly in settings, then weaver.wps_cfg file, or finally, uses the default values if not found.

weaver.wps.get_wps_local_status_location(url_status_location: AnyStr, container: AnySettingsContainer, must_exist: bool = True) → Optional[AnyStr][source]

Attempts to retrieve the local file path corresponding to the WPS status location as URL.

Parameters
  • url_status_location – URL reference pointing to some WPS status location XML.

  • container – any settings container to map configured local paths.

  • must_exist – return only existing path if enabled, otherwise return the parsed value without validation.

Returns

found local file path if it exists, None otherwise.

weaver.wps.check_wps_status(url: Optional[AnyStr] = None, response: Optional[etree.ElementBase] = None, sleep_secs: int = 2, verify: bool = True, settings: Optional[AnySettingsContainer] = None) → WPSExecution[source]

Run owslib.wps.WPSExecution.checkStatus() with additional exception handling.

Parameters
  • url – job URL where to look for job status.

  • response – WPS response document of job status.

  • sleep_secs – number of seconds to sleep before returning control to the caller.

  • verify – Flag to enable SSL verification.

  • settings – Application settings to retrieve any additional request parameters as applicable.

Returns

OWSLib.wps.WPSExecution object.

weaver.wps.load_pywps_cfg(container: AnySettingsContainer, config: Optional[Union[AnyStr, Dict[AnyStr, AnyStr]]] = None) → ConfigParser[source]

Loads and updates the PyWPS configuration using Weaver settings.

weaver.wps.pywps_view(environ, start_response)[source]
  • TODO: add xml response renderer

weaver.wps.includeme(config)[source]