sift_client.resources.channels
¶
| CLASS | DESCRIPTION |
|---|---|
ChannelsAPIAsync |
High-level API for interacting with channels. |
ChannelsAPIAsync
¶
ChannelsAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with channels.
This class provides a Pythonic, notebook-friendly interface for interacting with the ChannelsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Channel class from the low-level wrapper, which is a user-friendly representation of a channel using standard Python data structures and types.
Initialize the ChannelsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
find |
Find a single channel matching the given query. Takes the same arguments as |
get |
Get a Channel. |
get_data |
Get data for one or more channels. |
get_data_as_arrow |
Get data for one or more channels as pyarrow tables. |
list_ |
List channels with optional filtering. |
find
async
¶
find(**kwargs) -> Channel | None
Find a single channel matching the given query. Takes the same arguments as list. If more than one channel is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Channel | None
|
The Channel found or None. |
get
async
¶
get_data
async
¶
get_data(
*,
channels: list[Channel],
run_id: str | None = None,
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
) -> dict[str, DataFrame]
Get data for one or more channels.
| PARAMETER | DESCRIPTION |
|---|---|
channels
|
The channels to get data for. |
run_id
|
The run to get data for.
TYPE:
|
start_time
|
The start time to get data for.
TYPE:
|
end_time
|
The end time to get data for.
TYPE:
|
limit
|
The maximum number of data points to return. Will be in increments of page_size or default page size defined by the call if no page_size is provided.
TYPE:
|
get_data_as_arrow
async
¶
get_data_as_arrow(
*,
channels: list[Channel],
run_id: str | None = None,
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
) -> dict[str, Table]
Get data for one or more channels as pyarrow tables.
list_
async
¶
list_(
*,
asset_id: str | None = None,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
description: str | None = None,
description_contains: str | None = None,
active: bool | None = None,
run_id: str | None = None,
run_name: str | None = None,
client_key: str | None = None,
created_before: datetime | None = None,
created_after: datetime | None = None,
modified_before: datetime | None = None,
modified_after: datetime | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Channel]
List channels with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
asset_id
|
The asset ID to get.
TYPE:
|
name
|
The name of the channel to get.
TYPE:
|
name_contains
|
The partial name of the channel to get.
TYPE:
|
name_regex
|
The regex name of the channel to get. |
description
|
The description of the channel to get.
TYPE:
|
description_contains
|
The partial description of the channel to get.
TYPE:
|
active
|
Whether the channel is active.
TYPE:
|
run_id
|
The run ID to get.
TYPE:
|
run_name
|
The name of the run to get.
TYPE:
|
client_key
|
The client key of the run to get.
TYPE:
|
created_before
|
The created date of the channel to get.
TYPE:
|
created_after
|
The created date of the channel to get.
TYPE:
|
modified_before
|
The modified date of the channel to get.
TYPE:
|
modified_after
|
The modified date of the channel to get.
TYPE:
|
order_by
|
How to order the retrieved channels.
TYPE:
|
limit
|
How many channels to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Channel]
|
A list of Channels that matches the filter. |