weaver.status

Module Contents

class weaver.status.StatusCompliant[source]

Utility enum.Enum methods.

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.

OGC = 'OGC'[source]
PYWPS = 'PYWPS'[source]
OWSLIB = 'OWSLIB'[source]
class weaver.status.StatusCategory[source]

Utility enum.Enum methods.

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.

FINISHED = 'FINISHED'[source]
RUNNING = 'RUNNING'[source]
FAILED = 'FAILED'[source]
class weaver.status.Status[source]

Constants container that provides similar functionalities to ExtendedEnum without explicit Enum membership.

ACCEPTED = 'accepted'[source]
STARTED = 'started'[source]
PAUSED = 'paused'[source]
SUCCEEDED = 'succeeded'[source]
SUCCESSFUL = 'successful'[source]
FAILED = 'failed'[source]
RUNNING = 'running'[source]
DISMISSED = 'dismissed'[source]
EXCEPTION = 'exception'[source]
UNKNOWN = 'unknown'[source]
weaver.status.JOB_STATUS_CATEGORIES[source]
weaver.status.JOB_STATUS_CODE_API[source]
weaver.status.JOB_STATUS_SEARCH_API[source]
weaver.status.STATUS_PYWPS_MAP[source]
weaver.status.STATUS_PYWPS_IDS[source]
weaver.status.StatusType[source]
weaver.status.map_status(wps_status: AnyStatusType, compliant: StatusCompliant = StatusCompliant.OGC) StatusType[source]

Maps WPS execution statuses to between compatible values of different implementations.

Mapping is supported for values from weaver.status, OWSLib, pywps as well as some specific one-of values of custom implementations.

For each compliant combination, unsupported statuses are changed to corresponding ones (with closest logical match). Statuses are returned following Status format. Specifically, this ensures statues are lowercase and not prefixed by Process (as in XML response of OWS WPS like ProcessSucceeded for example).

Parameters
  • wps_status – One of Status or its literal value to map to compliant standard.

  • compliant – One of StatusCompliant values.

Returns

mapped status complying to the requested compliant category, or Status.UNKNOWN if no match found.