Skip to content

Tools API.

The DeepOriginClient can be used to access the tools API using:

from deeporigin.platform.client import DeepOriginClient

client = DeepOriginClient()

Then, the following methods can be used, for example:

functions = client.functions.list()

src.platform.functions.Functions

Functions API wrapper.

Provides access to functions-related endpoints through the DeepOriginClient.

Functions

list

list() -> list[dict]

Get all function definitions.

Returns:

Type Description
list[dict]

List of function definition dictionaries.

run

run(
    *,
    key: str,
    version: str,
    params: dict,
    cluster_id: str | None = None,
    tag: str | None = None
) -> dict

Run a specific version of a function.

Parameters:

Name Type Description Default
key str

Key of the function to run.

required
version str

Version of the function to run.

required
params dict

Function execution parameters.

required
cluster_id str | None

Cluster ID to run the function on. If None, uses the default cluster ID (first non-dev cluster, cached).

None
tag str | None

Optional tag for the execution.

None

Returns:

Type Description
dict

Dictionary containing the execution response from the API.

run_latest

run_latest(
    *,
    key: str,
    params: dict,
    cluster_id: str | None = None,
    tag: str | None = None
) -> dict

Run the latest enabled version of a function.

Parameters:

Name Type Description Default
key str

Key of the function to run.

required
params dict

Function execution parameters.

required
cluster_id str | None

Cluster ID to run the function on. If None, uses the default cluster ID (first non-dev cluster, cached).

None
tag str | None

Optional tag for the execution.

None

Returns:

Type Description
dict

Dictionary containing the execution response from the API.