weaver.status
Module Contents
- class weaver.status.StatusCompliant[source]
Utility
enum.Enummethods.Create an extended enum with these utilities as follows.
class CustomEnum(ExtendedEnum): ItemA = "A" ItemB = "B"
Warning
Must not define any enum value here to allow inheritance by subclasses.
- class weaver.status.StatusCategory[source]
Utility
enum.Enummethods.Create an extended enum with these utilities as follows.
class CustomEnum(ExtendedEnum): ItemA = "A" ItemB = "B"
Warning
Must not define any enum value here to allow inheritance by subclasses.
- class weaver.status.Status[source]
Constants container that provides similar functionalities to
ExtendedEnumwithout explicit Enum membership.
- weaver.status.map_status(wps_status: AnyStatusType) StatusType[source]
- weaver.status.map_status(wps_status: AnyStatusType, compliant: StatusCompliant) StatusType
- weaver.status.map_status(wps_status: AnyStatusType, *, category: Any) StatusCategory
Maps execution statuses between compatible values of different implementations.
Mapping is supported for values from
weaver.status,OWSLib,pywps, openEO, as well as some specific one-of values of custom OAP implementations.For each compliant combination, unsupported statuses are changed to corresponding ones with the closest logical match. Statuses are returned following
Statusformat. Specifically, this ensures statues are lowercase and not prefixed byProcess(as in XML response of OWS WPS likeProcessSucceededfor example).- Parameters:
wps_status – One of
Statusor its literal value to map to compliant standard.compliant – One of
StatusCompliantvalues.category – Request that the
StatusCategorycorresponding to the supplied status is returned.
- Returns:
Mapped status complying to the requested compliant category, or
Status.UNKNOWNif no match found.