weaver.wps_restapi.utils

Module Contents

weaver.wps_restapi.utils.LOGGER[source]
weaver.wps_restapi.utils.WPS_VERSION_100 = 1.0.0[source]
weaver.wps_restapi.utils.WPS_VERSION_200 = 2.0.0[source]
weaver.wps_restapi.utils.OUTPUT_FORMAT_JSON = json[source]
weaver.wps_restapi.utils.OUTPUT_FORMAT_XML = xml[source]
weaver.wps_restapi.utils.OUTPUT_FORMATS[source]
weaver.wps_restapi.utils.wps_restapi_base_path(container: AnySettingsContainer) → AnyStr[source]
weaver.wps_restapi.utils.get_wps_restapi_base_url(container: AnySettingsContainer) → AnyStr[source]
weaver.wps_restapi.utils.get_wps_output_format(request: Request, service_url: AnyStr = None) → AnyStr[source]
Get the preferred output format from WPS after checking various hints:
  • ‘version’ in query string

  • Content-Type in accept headers

  • GetCapabilities of the service

Parameters
  • request – request for which a response of WPS version-specific format must be generated.

  • service_url – endpoint URL of the service to request ‘GetCapabilities’ if version not found by previous hints.

Returns

one of OUTPUT_FORMAT (default: 1.0.0 => ‘xml’ if no direct hint matched)