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. |
unarchive |
Unarchive a run. |
update |
Update a Run. |
archive
async
¶
create
async
¶
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,
names: list[str] | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
run_ids: list[str] | None = None,
client_keys: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | str | None = None,
modified_by: Any | str | None = None,
tags: list[str | Tag] | None = None,
metadata: list[Any] | None = None,
assets: list[Asset] | list[str] | None = None,
asset_tags: list[str | Tag] | None = None,
duration_less_than: timedelta | None = None,
duration_greater_than: timedelta | None = None,
start_time_after: datetime | None = None,
start_time_before: datetime | None = None,
stop_time_after: datetime | None = None,
stop_time_before: datetime | None = None,
is_stopped: bool | None = None,
description_contains: str | None = None,
include_archived: bool = False,
filter_query: str | None = None,
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:
|
names
|
List of run names to filter by. |
name_contains
|
Partial name of the run.
TYPE:
|
name_regex
|
Regular expression to filter runs by name. |
run_ids
|
Filter to runs with any of these IDs. |
client_keys
|
Filter to runs with any of these client keys. |
created_after
|
Filter runs created after this datetime.
TYPE:
|
created_before
|
Filter runs created before this datetime.
TYPE:
|
modified_after
|
Filter runs modified after this datetime.
TYPE:
|
modified_before
|
Filter runs modified before this datetime.
TYPE:
|
created_by
|
Filter runs created by this User or user ID. |
modified_by
|
Filter runs last modified by this User or user ID. |
tags
|
Filter runs with any of these Tags IDs. |
metadata
|
Filter runs by metadata criteria. |
assets
|
Filter runs associated with any of these Assets or asset IDs. |
asset_tags
|
Filter runs associated with any Assets that have these Tag IDs. |
duration_less_than
|
Filter runs with duration less than this time.
TYPE:
|
duration_greater_than
|
Filter runs with duration greater than this time.
TYPE:
|
start_time_after
|
Filter runs that started after this datetime.
TYPE:
|
start_time_before
|
Filter runs that started before this datetime.
TYPE:
|
stop_time_after
|
Filter runs that stopped after this datetime.
TYPE:
|
stop_time_before
|
Filter runs that stopped before this datetime.
TYPE:
|
is_stopped
|
Whether the run is stopped.
TYPE:
|
description_contains
|
Partial description of the run.
TYPE:
|
include_archived
|
If True, include archived runs in results.
TYPE:
|
filter_query
|
Explicit CEL query to filter runs.
TYPE:
|
order_by
|
Field and direction to order results by.
TYPE:
|
limit
|
Maximum number of runs to return. If None, returns all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Run]
|
A list of Run objects that match the filter criteria. |