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:

tools = client.tools.list()

src.platform.tools.Tools

Tools API wrapper.

Provides access to tools-related endpoints through the DeepOriginClient.

Functions

get

get(*, tool_key: str, tool_version: str) -> dict

Return a single tool definition for the given key and version.

Uses GET /tools/protected/tools/{toolKey}/{toolVersion}/definitions.

Parameters:

Name Type Description Default
tool_key str

Tool identifier.

required
tool_version str

Exact version string to match.

required

Returns:

Type Description
dict

Tool definition dict (includes inputs, key, version, etc.).

get_by_key

get_by_key(*, tool_key: str) -> list[dict]

Get all versions of a tool definition by tool key.

Parameters:

Name Type Description Default
tool_key str

The key of the tool to get the definitions for.

required

Returns:

Type Description
list[dict]

List of tool definition dictionaries for all versions of the tool.

list

list() -> list[dict]

List all available tool definitions.

Returns:

Type Description
list[dict]

List of tool definition dictionaries from the API.