sift_client.resources
¶
MODULE | DESCRIPTION |
---|---|
assets |
|
calculated_channels |
|
channels |
|
ingestion |
|
ping |
|
rules |
|
runs |
|
sync_stubs |
|
CLASS | DESCRIPTION |
---|---|
AssetsAPI |
Sync counterpart to |
AssetsAPIAsync |
High-level API for interacting with assets. |
CalculatedChannelsAPI |
Sync counterpart to |
CalculatedChannelsAPIAsync |
High-level API for interacting with calculated channels. |
ChannelsAPI |
Sync counterpart to |
ChannelsAPIAsync |
High-level API for interacting with channels. |
IngestionAPIAsync |
High-level API for interacting with ingestion services. |
PingAPI |
Sync counterpart to |
PingAPIAsync |
High-level API for performing health checks. |
RulesAPI |
Sync counterpart to |
RulesAPIAsync |
High-level API for interacting with rules. |
RunsAPI |
Sync counterpart to |
RunsAPIAsync |
High-level API for interacting with runs. |
__all__
module-attribute
¶
__all__ = [
"AssetsAPI",
"AssetsAPIAsync",
"CalculatedChannelsAPI",
"CalculatedChannelsAPIAsync",
"ChannelsAPI",
"ChannelsAPIAsync",
"IngestionAPIAsync",
"PingAPI",
"PingAPIAsync",
"RulesAPI",
"RulesAPIAsync",
"RunsAPI",
"RunsAPIAsync",
]
AssetsAPI
¶
AssetsAPI(sift_client: SiftClient)
Sync counterpart to AssetsAPIAsync
.
High-level API for interacting with assets.
This class provides a Pythonic, notebook-friendly interface for interacting with the AssetsAPI.
It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Asset class from the low-level wrapper, which is a user-friendly
representation of an asset using standard Python data structures and types.
Initialize the AssetsAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
archive |
Archive an asset. |
find |
Find a single asset matching the given query. Takes the same arguments as |
get |
Get an Asset. |
list_ |
List assets with optional filtering. |
update |
Update an Asset. |
archive
¶
find
¶
find(**kwargs) -> Asset | None
Find a single asset matching the given query. Takes the same arguments as list_
. If more than one asset is found,
raises an error.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Asset | None
|
The Asset found or None. |
get
¶
list_
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
asset_ids: 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 | None = None,
modified_by: Any | None = None,
tags: list[str] | None = None,
tag_ids: list[str] | None = None,
metadata: list[Any] | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Asset]
List assets with optional filtering.
PARAMETER | DESCRIPTION |
---|---|
asset_ids
|
List of asset IDs to filter by. |
name
|
Exact name of the asset.
TYPE:
|
name_contains
|
Partial name of the asset.
TYPE:
|
name_regex
|
Regular expression string to filter assets by name. |
asset_ids
|
List of asset IDs to filter by. |
created_after
|
Created after this date.
TYPE:
|
created_before
|
Created before this date.
TYPE:
|
modified_after
|
Modified after this date.
TYPE:
|
modified_before
|
Modified before this date.
TYPE:
|
created_by
|
Assets created by this user.
TYPE:
|
modified_by
|
Assets last modified by this user.
TYPE:
|
tags
|
Assets with these tags. |
tag_ids
|
List of asset tag IDs to filter by. |
metadata
|
metadata filter |
include_archived
|
Include archived assets.
TYPE:
|
filter_query
|
Explicit CEL query to filter assets.
TYPE:
|
order_by
|
How to order the retrieved assets. # TODO: tooling for this?
TYPE:
|
limit
|
How many assets to retrieve. If None, retrieves all matches.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[Asset]
|
A list of Assets that matches the filter. |
AssetsAPIAsync
¶
AssetsAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with assets.
This class provides a Pythonic, notebook-friendly interface for interacting with the AssetsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Asset class from the low-level wrapper, which is a user-friendly representation of an asset using standard Python data structures and types.
Initialize the AssetsAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
archive |
Archive an asset. |
find |
Find a single asset matching the given query. Takes the same arguments as |
get |
Get an Asset. |
list_ |
List assets with optional filtering. |
update |
Update an Asset. |
archive
async
¶
find
async
¶
find(**kwargs) -> Asset | None
Find a single asset matching the given query. Takes the same arguments as list_
. If more than one asset is found,
raises an error.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Asset | None
|
The Asset found or None. |
get
async
¶
list_
async
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
asset_ids: 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 | None = None,
modified_by: Any | None = None,
tags: list[str] | None = None,
tag_ids: list[str] | None = None,
metadata: list[Any] | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Asset]
List assets with optional filtering.
PARAMETER | DESCRIPTION |
---|---|
asset_ids
|
List of asset IDs to filter by. |
name
|
Exact name of the asset.
TYPE:
|
name_contains
|
Partial name of the asset.
TYPE:
|
name_regex
|
Regular expression string to filter assets by name. |
asset_ids
|
List of asset IDs to filter by. |
created_after
|
Created after this date.
TYPE:
|
created_before
|
Created before this date.
TYPE:
|
modified_after
|
Modified after this date.
TYPE:
|
modified_before
|
Modified before this date.
TYPE:
|
created_by
|
Assets created by this user.
TYPE:
|
modified_by
|
Assets last modified by this user.
TYPE:
|
tags
|
Assets with these tags. |
tag_ids
|
List of asset tag IDs to filter by. |
metadata
|
metadata filter |
include_archived
|
Include archived assets.
TYPE:
|
filter_query
|
Explicit CEL query to filter assets.
TYPE:
|
order_by
|
How to order the retrieved assets. # TODO: tooling for this?
TYPE:
|
limit
|
How many assets to retrieve. If None, retrieves all matches.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[Asset]
|
A list of Assets that matches the filter. |
CalculatedChannelsAPI
¶
CalculatedChannelsAPI(sift_client: SiftClient)
Sync counterpart to CalculatedChannelsAPIAsync
.
High-level API for interacting with calculated channels.
This class provides a Pythonic, notebook-friendly interface for interacting with the CalculatedChannelsAPI.
It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the CalculatedChannel class from the low-level wrapper, which is a user-friendly
representation of a calculated channel using standard Python data structures and types.
Initialize the CalculatedChannelsAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
archive |
Archive a Calculated Channel. |
create |
Create a calculated channel. |
find |
Find a single calculated channel matching the given query. Takes the same arguments as |
get |
Get a Calculated Channel. |
list_ |
List calculated channels with optional filtering. |
list_versions |
List versions of a calculated channel. |
update |
Update a Calculated Channel. |
archive
¶
archive(
*, calculated_channel: str | CalculatedChannel
) -> None
Archive a Calculated Channel.
create
¶
create(
*,
name: str,
expression: str,
channel_references: list[ChannelReference],
description: str = "",
units: str | None = None,
client_key: str | None = None,
asset_ids: list[str] | None = None,
tag_ids: list[str] | None = None,
all_assets: bool = False,
user_notes: str = "",
) -> CalculatedChannel
Create a calculated channel.
PARAMETER | DESCRIPTION |
---|---|
name
|
The name of the calculated channel.
TYPE:
|
expression
|
The expression to calculate the value of the calculated channel.
TYPE:
|
channel_references
|
A list of channel references that are used in the expression.
TYPE:
|
description
|
The description of the calculated channel.
TYPE:
|
units
|
The units of the calculated channel.
TYPE:
|
client_key
|
A user-defined unique identifier for the calculated channel.
TYPE:
|
asset_ids
|
A list of asset IDs to make the calculation available for. |
tag_ids
|
A list of tag IDs to make the calculation available for. |
all_assets
|
A flag that, when set to True, associates the calculated channel with all assets.
TYPE:
|
user_notes
|
User notes for the calculated channel.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel
|
The created CalculatedChannel. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If asset configuration is invalid. |
find
¶
find(**kwargs) -> CalculatedChannel | None
Find a single calculated channel matching the given query. Takes the same arguments as list
but handles checking for multiple matches.
Will raise an error if multiple calculated channels are found.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel | None
|
The CalculatedChannel found or None. |
get
¶
get(
*,
calculated_channel_id: str | None = None,
client_key: str | None = None,
organization_id: str | None = None,
) -> CalculatedChannel
Get a Calculated Channel.
PARAMETER | DESCRIPTION |
---|---|
calculated_channel_id
|
The ID of the calculated channel.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
organization_id
|
The organization ID (required if using client_key and user belongs to multiple organizations).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel
|
The CalculatedChannel. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If neither calculated_channel_id nor client_key is provided. |
list_
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | 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 | None = None,
modified_by: Any | None = None,
client_key: str | None = None,
asset_id: str | None = None,
asset_name: str | None = None,
tag_id: str | None = None,
tag_name: str | None = None,
version: int | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
organization_id: str | None = None,
) -> list[CalculatedChannel]
List calculated channels with optional filtering.
PARAMETER | DESCRIPTION |
---|---|
name
|
Exact name of the calculated channel.
TYPE:
|
name_contains
|
Partial name of the calculated channel.
TYPE:
|
name_regex
|
Regular expression string to filter calculated channels by name. |
created_after
|
Created after this date.
TYPE:
|
created_before
|
Created before this date.
TYPE:
|
modified_after
|
Modified after this date.
TYPE:
|
modified_before
|
Modified before this date.
TYPE:
|
created_by
|
Calculated channels created by this user.
TYPE:
|
modified_by
|
Calculated channels last modified by this user.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
asset_id
|
The asset ID associated with the calculated channel.
TYPE:
|
asset_name
|
The asset name associated with the calculated channel.
TYPE:
|
tag_id
|
The tag ID associated with the calculated channel.
TYPE:
|
tag_name
|
The tag name associated with the calculated channel.
TYPE:
|
version
|
The version of the calculated channel.
TYPE:
|
include_archived
|
Include archived calculated channels.
TYPE:
|
filter_query
|
Explicit CEL query to filter calculated channels.
TYPE:
|
order_by
|
How to order the retrieved calculated channels.
TYPE:
|
limit
|
How many calculated channels to retrieve. If None, retrieves all matches.
TYPE:
|
organization_id
|
The organization ID (required if user belongs to multiple organizations).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[CalculatedChannel]
|
A list of CalculatedChannels that matches the filter. |
list_versions
¶
list_versions(
*,
calculated_channel_id: str | None = None,
client_key: str | None = None,
organization_id: str | None = None,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
asset_id: str | None = None,
asset_name: str | None = None,
tag_id: str | None = None,
tag_name: str | None = None,
version: int | None = None,
include_archived: bool = False,
order_by: str | None = None,
limit: int | None = None,
) -> list[CalculatedChannel]
List versions of a calculated channel.
PARAMETER | DESCRIPTION |
---|---|
calculated_channel_id
|
The ID of the calculated channel.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
name
|
The name of the calculated channel.
TYPE:
|
name_contains
|
The name of the calculated channel.
TYPE:
|
name_regex
|
The name of the calculated channel. |
asset_id
|
The asset ID of the calculated channel.
TYPE:
|
asset_name
|
The asset name of the calculated channel.
TYPE:
|
tag_id
|
The tag ID of the calculated channel.
TYPE:
|
tag_name
|
The tag name of the calculated channel.
TYPE:
|
version
|
The version of the calculated channel.
TYPE:
|
include_archived
|
Whether to include archived calculated channels.
TYPE:
|
organization_id
|
The organization ID. Required if your user belongs to multiple organizations.
TYPE:
|
order_by
|
The field to order by.
TYPE:
|
limit
|
How many versions to retrieve. If None, retrieves all matches.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[CalculatedChannel]
|
A list of CalculatedChannel versions. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If neither calculated_channel_id nor client_key is provided. |
update
¶
update(
*,
calculated_channel: str | CalculatedChannel,
update: CalculatedChannelUpdate | dict,
user_notes: str | None = None,
) -> CalculatedChannel
Update a Calculated Channel.
PARAMETER | DESCRIPTION |
---|---|
calculated_channel
|
The CalculatedChannel or id of the CalculatedChannel to update.
TYPE:
|
update
|
Updates to apply to the CalculatedChannel.
TYPE:
|
user_notes
|
User notes for the update.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel
|
The updated CalculatedChannel. |
CalculatedChannelsAPIAsync
¶
CalculatedChannelsAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with calculated channels.
This class provides a Pythonic, notebook-friendly interface for interacting with the CalculatedChannelsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the CalculatedChannel class from the low-level wrapper, which is a user-friendly representation of a calculated channel using standard Python data structures and types.
Initialize the CalculatedChannelsAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
archive |
Archive a Calculated Channel. |
create |
Create a calculated channel. |
find |
Find a single calculated channel matching the given query. Takes the same arguments as |
get |
Get a Calculated Channel. |
list_ |
List calculated channels with optional filtering. |
list_versions |
List versions of a calculated channel. |
update |
Update a Calculated Channel. |
archive
async
¶
archive(
*, calculated_channel: str | CalculatedChannel
) -> None
Archive a Calculated Channel.
create
async
¶
create(
*,
name: str,
expression: str,
channel_references: list[ChannelReference],
description: str = "",
units: str | None = None,
client_key: str | None = None,
asset_ids: list[str] | None = None,
tag_ids: list[str] | None = None,
all_assets: bool = False,
user_notes: str = "",
) -> CalculatedChannel
Create a calculated channel.
PARAMETER | DESCRIPTION |
---|---|
name
|
The name of the calculated channel.
TYPE:
|
expression
|
The expression to calculate the value of the calculated channel.
TYPE:
|
channel_references
|
A list of channel references that are used in the expression.
TYPE:
|
description
|
The description of the calculated channel.
TYPE:
|
units
|
The units of the calculated channel.
TYPE:
|
client_key
|
A user-defined unique identifier for the calculated channel.
TYPE:
|
asset_ids
|
A list of asset IDs to make the calculation available for. |
tag_ids
|
A list of tag IDs to make the calculation available for. |
all_assets
|
A flag that, when set to True, associates the calculated channel with all assets.
TYPE:
|
user_notes
|
User notes for the calculated channel.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel
|
The created CalculatedChannel. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If asset configuration is invalid. |
find
async
¶
find(**kwargs) -> CalculatedChannel | None
Find a single calculated channel matching the given query. Takes the same arguments as list
but handles checking for multiple matches.
Will raise an error if multiple calculated channels are found.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel | None
|
The CalculatedChannel found or None. |
get
async
¶
get(
*,
calculated_channel_id: str | None = None,
client_key: str | None = None,
organization_id: str | None = None,
) -> CalculatedChannel
Get a Calculated Channel.
PARAMETER | DESCRIPTION |
---|---|
calculated_channel_id
|
The ID of the calculated channel.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
organization_id
|
The organization ID (required if using client_key and user belongs to multiple organizations).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel
|
The CalculatedChannel. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If neither calculated_channel_id nor client_key is provided. |
list_
async
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | 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 | None = None,
modified_by: Any | None = None,
client_key: str | None = None,
asset_id: str | None = None,
asset_name: str | None = None,
tag_id: str | None = None,
tag_name: str | None = None,
version: int | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
organization_id: str | None = None,
) -> list[CalculatedChannel]
List calculated channels with optional filtering.
PARAMETER | DESCRIPTION |
---|---|
name
|
Exact name of the calculated channel.
TYPE:
|
name_contains
|
Partial name of the calculated channel.
TYPE:
|
name_regex
|
Regular expression string to filter calculated channels by name. |
created_after
|
Created after this date.
TYPE:
|
created_before
|
Created before this date.
TYPE:
|
modified_after
|
Modified after this date.
TYPE:
|
modified_before
|
Modified before this date.
TYPE:
|
created_by
|
Calculated channels created by this user.
TYPE:
|
modified_by
|
Calculated channels last modified by this user.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
asset_id
|
The asset ID associated with the calculated channel.
TYPE:
|
asset_name
|
The asset name associated with the calculated channel.
TYPE:
|
tag_id
|
The tag ID associated with the calculated channel.
TYPE:
|
tag_name
|
The tag name associated with the calculated channel.
TYPE:
|
version
|
The version of the calculated channel.
TYPE:
|
include_archived
|
Include archived calculated channels.
TYPE:
|
filter_query
|
Explicit CEL query to filter calculated channels.
TYPE:
|
order_by
|
How to order the retrieved calculated channels.
TYPE:
|
limit
|
How many calculated channels to retrieve. If None, retrieves all matches.
TYPE:
|
organization_id
|
The organization ID (required if user belongs to multiple organizations).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[CalculatedChannel]
|
A list of CalculatedChannels that matches the filter. |
list_versions
async
¶
list_versions(
*,
calculated_channel_id: str | None = None,
client_key: str | None = None,
organization_id: str | None = None,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
asset_id: str | None = None,
asset_name: str | None = None,
tag_id: str | None = None,
tag_name: str | None = None,
version: int | None = None,
include_archived: bool = False,
order_by: str | None = None,
limit: int | None = None,
) -> list[CalculatedChannel]
List versions of a calculated channel.
PARAMETER | DESCRIPTION |
---|---|
calculated_channel_id
|
The ID of the calculated channel.
TYPE:
|
client_key
|
The client key of the calculated channel.
TYPE:
|
name
|
The name of the calculated channel.
TYPE:
|
name_contains
|
The name of the calculated channel.
TYPE:
|
name_regex
|
The name of the calculated channel. |
asset_id
|
The asset ID of the calculated channel.
TYPE:
|
asset_name
|
The asset name of the calculated channel.
TYPE:
|
tag_id
|
The tag ID of the calculated channel.
TYPE:
|
tag_name
|
The tag name of the calculated channel.
TYPE:
|
version
|
The version of the calculated channel.
TYPE:
|
include_archived
|
Whether to include archived calculated channels.
TYPE:
|
organization_id
|
The organization ID. Required if your user belongs to multiple organizations.
TYPE:
|
order_by
|
The field to order by.
TYPE:
|
limit
|
How many versions to retrieve. If None, retrieves all matches.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[CalculatedChannel]
|
A list of CalculatedChannel versions. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If neither calculated_channel_id nor client_key is provided. |
update
async
¶
update(
*,
calculated_channel: str | CalculatedChannel,
update: CalculatedChannelUpdate | dict,
user_notes: str | None = None,
) -> CalculatedChannel
Update a Calculated Channel.
PARAMETER | DESCRIPTION |
---|---|
calculated_channel
|
The CalculatedChannel or id of the CalculatedChannel to update.
TYPE:
|
update
|
Updates to apply to the CalculatedChannel.
TYPE:
|
user_notes
|
User notes for the update.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CalculatedChannel
|
The updated CalculatedChannel. |
ChannelsAPI
¶
ChannelsAPI(sift_client: SiftClient)
Sync counterpart to ChannelsAPIAsync
.
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
¶
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
¶
get_data
¶
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
¶
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_
¶
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. |
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. |
IngestionAPIAsync
¶
IngestionAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with ingestion services.
This class provides a Pythonic, notebook-friendly interface for interacting with the IngestionAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Flow class from the types module, which is a user-friendly representation of ingestion flows using standard Python data structures and types.
Initialize the IngestionAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
create_ingestion_config |
Create an ingestion config. |
ingest |
Ingest data for a flow. |
wait_for_ingestion_to_complete |
Wait for all ingestion to complete. |
create_ingestion_config
async
¶
create_ingestion_config(
*,
asset_name: str,
run_id: str | None = None,
flows: list[Flow],
client_key: str | None = None,
organization_id: str | None = None,
) -> str
Create an ingestion config.
PARAMETER | DESCRIPTION |
---|---|
asset_name
|
The name of the asset for this ingestion config.
TYPE:
|
run_id
|
Optionally provide a run ID to create a run for the given asset.
TYPE:
|
flows
|
List of flow configurations. |
client_key
|
Optional client key for identifying this config.
TYPE:
|
organization_id
|
The organization ID.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The ingestion config ID. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If asset_name is not provided or flows is empty. |
ingest
¶
wait_for_ingestion_to_complete
¶
wait_for_ingestion_to_complete(
timeout: float | None = None,
)
Wait for all ingestion to complete.
PARAMETER | DESCRIPTION |
---|---|
run_id
|
The id of the run to wait for.
|
timeout
|
The timeout in seconds to wait for ingestion to complete. If None, will wait forever.
TYPE:
|
PingAPI
¶
PingAPI(sift_client: SiftClient)
Sync counterpart to PingAPIAsync
.
High-level API for performing health checks.
Initialize the AssetsAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
ping |
Send a ping request to the server. |
PingAPIAsync
¶
PingAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for performing health checks.
Initialize the AssetsAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
ping |
Send a ping request to the server. |
RulesAPI
¶
RulesAPI(sift_client: SiftClient)
Sync counterpart to RulesAPIAsync
.
High-level API for interacting with rules.
This class provides a Pythonic, notebook-friendly interface for interacting with the RulesAPI.
It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Rule class from the low-level wrapper, which is a user-friendly
representation of a rule using standard Python data structures and types.
Initialize the RulesAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
archive |
Archive a rule or multiple. |
batch_get |
Get multiple rules by rule IDs or client keys. |
batch_restore |
Batch restore rules. |
create |
Create a new rule. |
find |
Find a single rule matching the given query. Takes the same arguments as |
get |
Get a Rule. |
list_ |
List rules with optional filtering. |
restore |
Restore a rule. |
update |
Update a Rule. |
archive
¶
archive(
*,
rule: str | Rule | None = None,
rules: list[Rule] | None = None,
rule_ids: list[str] | None = None,
client_keys: list[str] | None = None,
) -> None
Archive a rule or multiple.
PARAMETER | DESCRIPTION |
---|---|
rule
|
The Rule to archive. |
rules
|
The Rules to archive. |
rule_ids
|
The rule IDs to archive. |
client_keys
|
The client keys to archive. |
batch_get
¶
batch_restore
¶
create
¶
create(
name: str,
description: str,
expression: str,
channel_references: list[ChannelReference],
action: RuleAction,
organization_id: str | None = None,
client_key: str | None = None,
asset_ids: list[str] | None = None,
contextual_channels: list[str] | None = None,
is_external: bool = False,
) -> Rule
Create a new rule.
find
¶
find(**kwargs) -> Rule | None
Find a single rule matching the given query. Takes the same arguments as list
. If more than one rule is found,
raises an error.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Rule | None
|
The Rule found or None. |
get
¶
list_
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
order_by: str | None = None,
limit: int | None = None,
include_deleted: bool = False,
) -> list[Rule]
List rules with optional filtering.
PARAMETER | DESCRIPTION |
---|---|
name
|
Exact name of the rule.
TYPE:
|
name_contains
|
Partial name of the rule.
TYPE:
|
name_regex
|
Regular expression string to filter rules by name. |
order_by
|
How to order the retrieved rules.
TYPE:
|
limit
|
How many rules to retrieve. If None, retrieves all matches.
TYPE:
|
include_deleted
|
Include deleted rules.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[Rule]
|
A list of Rules that matches the filter. |
restore
¶
Restore a rule.
PARAMETER | DESCRIPTION |
---|---|
rule
|
The Rule or rule ID to restore. |
rule_id
|
The rule ID to restore (alternative to rule parameter).
TYPE:
|
client_key
|
The client key to restore (alternative to rule parameter).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Rule
|
The restored Rule. |
update
¶
RulesAPIAsync
¶
RulesAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with rules.
This class provides a Pythonic, notebook-friendly interface for interacting with the RulesAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Rule class from the low-level wrapper, which is a user-friendly representation of a rule using standard Python data structures and types.
Initialize the RulesAPI.
PARAMETER | DESCRIPTION |
---|---|
sift_client
|
The Sift client to use.
TYPE:
|
METHOD | DESCRIPTION |
---|---|
archive |
Archive a rule or multiple. |
batch_get |
Get multiple rules by rule IDs or client keys. |
batch_restore |
Batch restore rules. |
create |
Create a new rule. |
find |
Find a single rule matching the given query. Takes the same arguments as |
get |
Get a Rule. |
list_ |
List rules with optional filtering. |
restore |
Restore a rule. |
update |
Update a Rule. |
archive
async
¶
archive(
*,
rule: str | Rule | None = None,
rules: list[Rule] | None = None,
rule_ids: list[str] | None = None,
client_keys: list[str] | None = None,
) -> None
Archive a rule or multiple.
PARAMETER | DESCRIPTION |
---|---|
rule
|
The Rule to archive. |
rules
|
The Rules to archive. |
rule_ids
|
The rule IDs to archive. |
client_keys
|
The client keys to archive. |
batch_get
async
¶
batch_restore
async
¶
create
async
¶
create(
name: str,
description: str,
expression: str,
channel_references: list[ChannelReference],
action: RuleAction,
organization_id: str | None = None,
client_key: str | None = None,
asset_ids: list[str] | None = None,
contextual_channels: list[str] | None = None,
is_external: bool = False,
) -> Rule
Create a new rule.
find
async
¶
find(**kwargs) -> Rule | None
Find a single rule matching the given query. Takes the same arguments as list
. If more than one rule is found,
raises an error.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Rule | None
|
The Rule found or None. |
get
async
¶
list_
async
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
order_by: str | None = None,
limit: int | None = None,
include_deleted: bool = False,
) -> list[Rule]
List rules with optional filtering.
PARAMETER | DESCRIPTION |
---|---|
name
|
Exact name of the rule.
TYPE:
|
name_contains
|
Partial name of the rule.
TYPE:
|
name_regex
|
Regular expression string to filter rules by name. |
order_by
|
How to order the retrieved rules.
TYPE:
|
limit
|
How many rules to retrieve. If None, retrieves all matches.
TYPE:
|
include_deleted
|
Include deleted rules.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[Rule]
|
A list of Rules that matches the filter. |
restore
async
¶
Restore a rule.
PARAMETER | DESCRIPTION |
---|---|
rule
|
The Rule or rule ID to restore. |
rule_id
|
The rule ID to restore (alternative to rule parameter).
TYPE:
|
client_key
|
The client key to restore (alternative to rule parameter).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Rule
|
The restored Rule. |
update
async
¶
RunsAPI
¶
RunsAPI(sift_client: SiftClient)
Sync counterpart to RunsAPIAsync
.
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
¶
create
¶
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
¶
find
¶
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
¶
list_
¶
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. |
stop
¶
stop_run
¶
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. |