weaver.wps_restapi.processes.utils
Module Contents
- weaver.wps_restapi.processes.utils.resolve_process_tag(request: weaver.typedefs.PyramidRequest, process_query: bool = False) str [source]
Obtain the tagged Process reference from request path and/or query according to available information.
Whether the Process is specified by path or query, another
version
query can be provided to specify the desired revision by itself. Thisversion
query is considered only if another version indication is not already specified in the Process reference using the tagged semantic.When
process_query = False
, possible combinations are as follows:/processes/{processID}:{version}
/processes/{processID}?version={version}
When
process_query = True
, possible combinations are as follows:/...?process={processID}:{version}
/...?process={processID}&version={version}
- Parameters:
request – Request from which to retrieve the process reference.
process_query – Whether the process ID reference is located in request path or
process={id}
query.
- weaver.wps_restapi.processes.utils.get_processes_filtered_by_valid_schemas(request: weaver.typedefs.PyramidRequest, detail: bool = True, links: bool = True) Tuple[List[weaver.typedefs.JSON], List[str], Dict[str, int | None], bool, int] [source]
Validates the processes summary schemas and returns them into valid/invalid lists.
- Returns:
List of valid process and invalid processes IDs for manual cleanup, along with filtering parameters.
- weaver.wps_restapi.processes.utils.get_process_list_links(request: weaver.typedefs.PyramidRequest, paging: Dict[str, int], total: int | None, provider: weaver.datatype.Service | None = None) List[weaver.typedefs.JSON] [source]
Obtains a list of all relevant links for the corresponding Process listing defined by query parameters.
- Raises:
IndexError – if the paging values are out of bounds compared to available total Process.