sift_client.resources.runs
¶
| CLASS | DESCRIPTION |
|---|---|
RunsAPIAsync |
High-level API for interacting with runs. |
RunsAPIAsync
¶
RunsAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with runs.
This class provides a Pythonic, notebook-friendly interface for interacting with the RunsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Run class from the low-level wrapper, which is a user-friendly representation of a run using standard Python data structures and types.
Initialize the RunsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive a run. |
create |
Create a new run. |
create_automatic_association_for_assets |
Associate assets with a run for automatic data ingestion. |
find |
Find a single run matching the given query. Takes the same arguments as |
get |
Get a Run. |
list_ |
List runs with optional filtering. |
stop |
Stop a run by setting its stop time to the current time. |
stop_run |
Stop a run by setting its stop time to the current time. |
update |
Update a Run. |
archive
async
¶
create
async
¶
create(
name: str,
description: str,
tags: list[str] | None = None,
start_time: datetime | None = None,
stop_time: datetime | None = None,
organization_id: str | None = None,
client_key: str | None = None,
metadata: dict[str, str | float | bool] | None = None,
) -> Run
Create a new run.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name of the run.
TYPE:
|
description
|
The description of the run.
TYPE:
|
tags
|
Tags to associate with the run. |
start_time
|
The start time of the run.
TYPE:
|
stop_time
|
The stop time of the run.
TYPE:
|
organization_id
|
The organization ID.
TYPE:
|
client_key
|
A unique client key for the run.
TYPE:
|
metadata
|
Metadata values for the run. |
| RETURNS | DESCRIPTION |
|---|---|
Run
|
The created Run. |
create_automatic_association_for_assets
async
¶
find
async
¶
find(**kwargs) -> Run | None
Find a single run matching the given query. Takes the same arguments as list. If more than one run is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Run | None
|
The Run found or None. |
get
async
¶
list_
async
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
description: str | None = None,
description_contains: str | None = None,
duration_seconds: int | None = None,
client_key: str | None = None,
asset_id: str | None = None,
asset_name: str | None = None,
created_by_user_id: str | None = None,
is_stopped: bool | None = None,
include_archived: bool = False,
order_by: str | None = None,
limit: int | None = None,
) -> list[Run]
List runs with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Exact name of the run.
TYPE:
|
name_contains
|
Partial name of the run.
TYPE:
|
name_regex
|
Regular expression string to filter runs by name. |
description
|
Exact description of the run.
TYPE:
|
description_contains
|
Partial description of the run.
TYPE:
|
duration_seconds
|
Duration of the run in seconds.
TYPE:
|
client_key
|
Client key to filter by.
TYPE:
|
asset_id
|
Asset ID to filter by.
TYPE:
|
asset_name
|
Asset name to filter by.
TYPE:
|
created_by_user_id
|
User ID who created the run.
TYPE:
|
is_stopped
|
Whether the run is stopped.
TYPE:
|
include_archived
|
Whether to include archived runs.
TYPE:
|
order_by
|
How to order the retrieved runs.
TYPE:
|
limit
|
How many runs to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Run]
|
A list of Runs that matches the filter. |