POI Data Integration

Client for managing existing POI data integration workflows

class slipo.process.ProcessClient(base_url, api_key)[source]

ProcessClient provides methods for managing existing POI data integration workflows.

Details about the API responses are available at the SLIPO site.

Parameters
  • base_url (str) – Base URL for SLIPO API endpoints. The default value is https://app.dev.slipo.eu/.

  • api_key (str) – SLIPO API key. An application key can be generated using the SLIPO Workbench application.

Returns

A ProcessClient object.

query(term: str = None, pageIndex: int = 0, pageSize: int = 10) → dict[source]

Query workflow instances.

Parameters
  • term (str, optional) – A term for filtering workflows. If specified, only the workflows whose name contains the term are returned.

  • pageIndex (str, optional) – Page index for data pagination.

  • pageSize (str, optional) – Page size for data pagination.

Returns

A dict representing the parsed JSON response.

Raises

SlipoException – If a network or server error has occurred.

save(process_id: int) → None[source]

Creates a new version for the specified workflow. The most recent version of the workflow is copied.

Parameters

process_id (int) – The process id.

Returns

A dict representing the parsed JSON response.

Raises

SlipoException – If a network or server error has occurred.

start(process_id: int, process_version: int) → dict[source]

Start or resume the execution of a workflow instance.

Parameters
  • process_id (int) – The process id.

  • process_version (int) – The process revision.

Returns

A dict representing the parsed JSON response.

Raises

SlipoException – If a network or server error has occurred.

stop(process_id: int, process_version: int) → None[source]

Stop a running workflow execution instance.

Parameters
  • process_id (int) – The process id.

  • process_version (int) – The process revision.

Raises

SlipoException – If a network or server error has occurred.

status(process_id: int, process_version: int) → dict[source]

Check the status of a workflow execution instance.

Parameters
  • process_id (int) – The process id.

  • process_version (int) – The process revision.

Returns

A dict representing the parsed JSON response.

Raises

SlipoException – If a network or server error has occurred.

download(process_id: int, process_version: int, file_id: int, target: str) → None[source]

Download an input or output file for a specific workflow execution instance.

During the execution of a workflow the following file types may be created:
  • CONFIGURATION: Tool configuration

  • INPUT: Input file

  • OUTPUT: Output file

  • SAMPLE: Sample data collected during step execution

  • KPI: Tool specific or aggregated KPI data

  • QA: Tool specific QA data

  • LOG: Logs recorded during step execution

Parameters
  • process_id (int) – The process id.

  • process_version (int) – The process revision.

  • file_id (int) – The file id.

  • target (str) – The path where to save the file.

Raises

SlipoException – If a network, server error or I/O error has occurred.