Skip to content

sift_client.resources

MODULE DESCRIPTION
assets
calculated_channels
channels
ingestion
ping
rules
runs
sync_stubs
CLASS DESCRIPTION
AssetsAPI

Sync counterpart to AssetsAPIAsync.

AssetsAPIAsync

High-level API for interacting with assets.

CalculatedChannelsAPI

Sync counterpart to CalculatedChannelsAPIAsync.

CalculatedChannelsAPIAsync

High-level API for interacting with calculated channels.

ChannelsAPI

Sync counterpart to ChannelsAPIAsync.

ChannelsAPIAsync

High-level API for interacting with channels.

IngestionAPIAsync

High-level API for interacting with ingestion services.

PingAPI

Sync counterpart to PingAPIAsync.

PingAPIAsync

High-level API for performing health checks.

RulesAPI

Sync counterpart to RulesAPIAsync.

RulesAPIAsync

High-level API for interacting with rules.

RunsAPI

Sync counterpart to RunsAPIAsync.

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: SiftClient

METHOD DESCRIPTION
archive

Archive an asset.

find

Find a single asset matching the given query. Takes the same arguments as list_. If more than one asset is found,

get

Get an Asset.

list_

List assets with optional filtering.

update

Update an Asset.

archive

archive(
    asset: str | Asset, *, archive_runs: bool = False
) -> Asset

Archive an asset.

PARAMETER DESCRIPTION
asset

The Asset or asset ID to archive.

TYPE: str | Asset

archive_runs

If True, archive all Runs associated with the Asset.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Asset

The archived Asset.

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 list_.

DEFAULT: {}

RETURNS DESCRIPTION
Asset | None

The Asset found or None.

get

get(
    *, asset_id: str | None = None, name: str | None = None
) -> Asset

Get an Asset.

PARAMETER DESCRIPTION
asset_id

The ID of the asset.

TYPE: str | None DEFAULT: None

name

The name of the asset.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Asset

The Asset.

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.

TYPE: list[str] | None DEFAULT: None

name

Exact name of the asset.

TYPE: str | None DEFAULT: None

name_contains

Partial name of the asset.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter assets by name.

TYPE: str | Pattern | None DEFAULT: None

asset_ids

List of asset IDs to filter by.

TYPE: list[str] | None DEFAULT: None

created_after

Created after this date.

TYPE: datetime | None DEFAULT: None

created_before

Created before this date.

TYPE: datetime | None DEFAULT: None

modified_after

Modified after this date.

TYPE: datetime | None DEFAULT: None

modified_before

Modified before this date.

TYPE: datetime | None DEFAULT: None

created_by

Assets created by this user.

TYPE: Any | None DEFAULT: None

modified_by

Assets last modified by this user.

TYPE: Any | None DEFAULT: None

tags

Assets with these tags.

TYPE: list[str] | None DEFAULT: None

tag_ids

List of asset tag IDs to filter by.

TYPE: list[str] | None DEFAULT: None

metadata

metadata filter

TYPE: list[Any] | None DEFAULT: None

include_archived

Include archived assets.

TYPE: bool DEFAULT: False

filter_query

Explicit CEL query to filter assets.

TYPE: str | None DEFAULT: None

order_by

How to order the retrieved assets. # TODO: tooling for this?

TYPE: str | None DEFAULT: None

limit

How many assets to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

RETURNS DESCRIPTION
list[Asset]

A list of Assets that matches the filter.

update

update(
    asset: str | Asset, update: AssetUpdate | dict
) -> Asset

Update an Asset.

PARAMETER DESCRIPTION
asset

The Asset or asset ID to update.

TYPE: str | Asset

update

Updates to apply to the Asset.

TYPE: AssetUpdate | dict

RETURNS DESCRIPTION
Asset

The updated Asset.

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: SiftClient

METHOD DESCRIPTION
archive

Archive an asset.

find

Find a single asset matching the given query. Takes the same arguments as list_. If more than one asset is found,

get

Get an Asset.

list_

List assets with optional filtering.

update

Update an Asset.

archive async

archive(
    asset: str | Asset, *, archive_runs: bool = False
) -> Asset

Archive an asset.

PARAMETER DESCRIPTION
asset

The Asset or asset ID to archive.

TYPE: str | Asset

archive_runs

If True, archive all Runs associated with the Asset.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Asset

The archived Asset.

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 list_.

DEFAULT: {}

RETURNS DESCRIPTION
Asset | None

The Asset found or None.

get async

get(
    *, asset_id: str | None = None, name: str | None = None
) -> Asset

Get an Asset.

PARAMETER DESCRIPTION
asset_id

The ID of the asset.

TYPE: str | None DEFAULT: None

name

The name of the asset.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Asset

The Asset.

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.

TYPE: list[str] | None DEFAULT: None

name

Exact name of the asset.

TYPE: str | None DEFAULT: None

name_contains

Partial name of the asset.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter assets by name.

TYPE: str | Pattern | None DEFAULT: None

asset_ids

List of asset IDs to filter by.

TYPE: list[str] | None DEFAULT: None

created_after

Created after this date.

TYPE: datetime | None DEFAULT: None

created_before

Created before this date.

TYPE: datetime | None DEFAULT: None

modified_after

Modified after this date.

TYPE: datetime | None DEFAULT: None

modified_before

Modified before this date.

TYPE: datetime | None DEFAULT: None

created_by

Assets created by this user.

TYPE: Any | None DEFAULT: None

modified_by

Assets last modified by this user.

TYPE: Any | None DEFAULT: None

tags

Assets with these tags.

TYPE: list[str] | None DEFAULT: None

tag_ids

List of asset tag IDs to filter by.

TYPE: list[str] | None DEFAULT: None

metadata

metadata filter

TYPE: list[Any] | None DEFAULT: None

include_archived

Include archived assets.

TYPE: bool DEFAULT: False

filter_query

Explicit CEL query to filter assets.

TYPE: str | None DEFAULT: None

order_by

How to order the retrieved assets. # TODO: tooling for this?

TYPE: str | None DEFAULT: None

limit

How many assets to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

RETURNS DESCRIPTION
list[Asset]

A list of Assets that matches the filter.

update async

update(
    asset: str | Asset, update: AssetUpdate | dict
) -> Asset

Update an Asset.

PARAMETER DESCRIPTION
asset

The Asset or asset ID to update.

TYPE: str | Asset

update

Updates to apply to the Asset.

TYPE: AssetUpdate | dict

RETURNS DESCRIPTION
Asset

The updated Asset.

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: SiftClient

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 list but handles checking for multiple matches.

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: str

expression

The expression to calculate the value of the calculated channel.

TYPE: str

channel_references

A list of channel references that are used in the expression.

TYPE: list[ChannelReference]

description

The description of the calculated channel.

TYPE: str DEFAULT: ''

units

The units of the calculated channel.

TYPE: str | None DEFAULT: None

client_key

A user-defined unique identifier for the calculated channel.

TYPE: str | None DEFAULT: None

asset_ids

A list of asset IDs to make the calculation available for.

TYPE: list[str] | None DEFAULT: None

tag_ids

A list of tag IDs to make the calculation available for.

TYPE: list[str] | None DEFAULT: None

all_assets

A flag that, when set to True, associates the calculated channel with all assets.

TYPE: bool DEFAULT: False

user_notes

User notes for the calculated channel.

TYPE: str DEFAULT: ''

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 list.

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: str | None DEFAULT: None

client_key

The client key of the calculated channel.

TYPE: str | None DEFAULT: None

organization_id

The organization ID (required if using client_key and user belongs to multiple organizations).

TYPE: str | None DEFAULT: None

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: str | None DEFAULT: None

name_contains

Partial name of the calculated channel.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter calculated channels by name.

TYPE: str | Pattern | None DEFAULT: None

created_after

Created after this date.

TYPE: datetime | None DEFAULT: None

created_before

Created before this date.

TYPE: datetime | None DEFAULT: None

modified_after

Modified after this date.

TYPE: datetime | None DEFAULT: None

modified_before

Modified before this date.

TYPE: datetime | None DEFAULT: None

created_by

Calculated channels created by this user.

TYPE: Any | None DEFAULT: None

modified_by

Calculated channels last modified by this user.

TYPE: Any | None DEFAULT: None

client_key

The client key of the calculated channel.

TYPE: str | None DEFAULT: None

asset_id

The asset ID associated with the calculated channel.

TYPE: str | None DEFAULT: None

asset_name

The asset name associated with the calculated channel.

TYPE: str | None DEFAULT: None

tag_id

The tag ID associated with the calculated channel.

TYPE: str | None DEFAULT: None

tag_name

The tag name associated with the calculated channel.

TYPE: str | None DEFAULT: None

version

The version of the calculated channel.

TYPE: int | None DEFAULT: None

include_archived

Include archived calculated channels.

TYPE: bool DEFAULT: False

filter_query

Explicit CEL query to filter calculated channels.

TYPE: str | None DEFAULT: None

order_by

How to order the retrieved calculated channels.

TYPE: str | None DEFAULT: None

limit

How many calculated channels to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

organization_id

The organization ID (required if user belongs to multiple organizations).

TYPE: str | None DEFAULT: None

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: str | None DEFAULT: None

client_key

The client key of the calculated channel.

TYPE: str | None DEFAULT: None

name

The name of the calculated channel.

TYPE: str | None DEFAULT: None

name_contains

The name of the calculated channel.

TYPE: str | None DEFAULT: None

name_regex

The name of the calculated channel.

TYPE: str | Pattern | None DEFAULT: None

asset_id

The asset ID of the calculated channel.

TYPE: str | None DEFAULT: None

asset_name

The asset name of the calculated channel.

TYPE: str | None DEFAULT: None

tag_id

The tag ID of the calculated channel.

TYPE: str | None DEFAULT: None

tag_name

The tag name of the calculated channel.

TYPE: str | None DEFAULT: None

version

The version of the calculated channel.

TYPE: int | None DEFAULT: None

include_archived

Whether to include archived calculated channels.

TYPE: bool DEFAULT: False

organization_id

The organization ID. Required if your user belongs to multiple organizations.

TYPE: str | None DEFAULT: None

order_by

The field to order by.

TYPE: str | None DEFAULT: None

limit

How many versions to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

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: str | CalculatedChannel

update

Updates to apply to the CalculatedChannel.

TYPE: CalculatedChannelUpdate | dict

user_notes

User notes for the update.

TYPE: str | None DEFAULT: None

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: SiftClient

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 list but handles checking for multiple matches.

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: str

expression

The expression to calculate the value of the calculated channel.

TYPE: str

channel_references

A list of channel references that are used in the expression.

TYPE: list[ChannelReference]

description

The description of the calculated channel.

TYPE: str DEFAULT: ''

units

The units of the calculated channel.

TYPE: str | None DEFAULT: None

client_key

A user-defined unique identifier for the calculated channel.

TYPE: str | None DEFAULT: None

asset_ids

A list of asset IDs to make the calculation available for.

TYPE: list[str] | None DEFAULT: None

tag_ids

A list of tag IDs to make the calculation available for.

TYPE: list[str] | None DEFAULT: None

all_assets

A flag that, when set to True, associates the calculated channel with all assets.

TYPE: bool DEFAULT: False

user_notes

User notes for the calculated channel.

TYPE: str DEFAULT: ''

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 list.

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: str | None DEFAULT: None

client_key

The client key of the calculated channel.

TYPE: str | None DEFAULT: None

organization_id

The organization ID (required if using client_key and user belongs to multiple organizations).

TYPE: str | None DEFAULT: None

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: str | None DEFAULT: None

name_contains

Partial name of the calculated channel.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter calculated channels by name.

TYPE: str | Pattern | None DEFAULT: None

created_after

Created after this date.

TYPE: datetime | None DEFAULT: None

created_before

Created before this date.

TYPE: datetime | None DEFAULT: None

modified_after

Modified after this date.

TYPE: datetime | None DEFAULT: None

modified_before

Modified before this date.

TYPE: datetime | None DEFAULT: None

created_by

Calculated channels created by this user.

TYPE: Any | None DEFAULT: None

modified_by

Calculated channels last modified by this user.

TYPE: Any | None DEFAULT: None

client_key

The client key of the calculated channel.

TYPE: str | None DEFAULT: None

asset_id

The asset ID associated with the calculated channel.

TYPE: str | None DEFAULT: None

asset_name

The asset name associated with the calculated channel.

TYPE: str | None DEFAULT: None

tag_id

The tag ID associated with the calculated channel.

TYPE: str | None DEFAULT: None

tag_name

The tag name associated with the calculated channel.

TYPE: str | None DEFAULT: None

version

The version of the calculated channel.

TYPE: int | None DEFAULT: None

include_archived

Include archived calculated channels.

TYPE: bool DEFAULT: False

filter_query

Explicit CEL query to filter calculated channels.

TYPE: str | None DEFAULT: None

order_by

How to order the retrieved calculated channels.

TYPE: str | None DEFAULT: None

limit

How many calculated channels to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

organization_id

The organization ID (required if user belongs to multiple organizations).

TYPE: str | None DEFAULT: None

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: str | None DEFAULT: None

client_key

The client key of the calculated channel.

TYPE: str | None DEFAULT: None

name

The name of the calculated channel.

TYPE: str | None DEFAULT: None

name_contains

The name of the calculated channel.

TYPE: str | None DEFAULT: None

name_regex

The name of the calculated channel.

TYPE: str | Pattern | None DEFAULT: None

asset_id

The asset ID of the calculated channel.

TYPE: str | None DEFAULT: None

asset_name

The asset name of the calculated channel.

TYPE: str | None DEFAULT: None

tag_id

The tag ID of the calculated channel.

TYPE: str | None DEFAULT: None

tag_name

The tag name of the calculated channel.

TYPE: str | None DEFAULT: None

version

The version of the calculated channel.

TYPE: int | None DEFAULT: None

include_archived

Whether to include archived calculated channels.

TYPE: bool DEFAULT: False

organization_id

The organization ID. Required if your user belongs to multiple organizations.

TYPE: str | None DEFAULT: None

order_by

The field to order by.

TYPE: str | None DEFAULT: None

limit

How many versions to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

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: str | CalculatedChannel

update

Updates to apply to the CalculatedChannel.

TYPE: CalculatedChannelUpdate | dict

user_notes

User notes for the update.

TYPE: str | None DEFAULT: None

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: SiftClient

METHOD DESCRIPTION
find

Find a single channel matching the given query. Takes the same arguments as list. If more than one channel is found,

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 list.

DEFAULT: {}

RETURNS DESCRIPTION
Channel | None

The Channel found or None.

get

get(*, channel_id: str) -> Channel

Get a Channel.

PARAMETER DESCRIPTION
channel_id

The ID of the channel.

TYPE: str

RETURNS DESCRIPTION
Channel

The Channel.

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.

TYPE: list[Channel]

run_id

The run to get data for.

TYPE: str | None DEFAULT: None

start_time

The start time to get data for.

TYPE: datetime | None DEFAULT: None

end_time

The end time to get data for.

TYPE: datetime | None DEFAULT: None

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: int | None DEFAULT: None

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: str | None DEFAULT: None

name

The name of the channel to get.

TYPE: str | None DEFAULT: None

name_contains

The partial name of the channel to get.

TYPE: str | None DEFAULT: None

name_regex

The regex name of the channel to get.

TYPE: str | Pattern | None DEFAULT: None

description

The description of the channel to get.

TYPE: str | None DEFAULT: None

description_contains

The partial description of the channel to get.

TYPE: str | None DEFAULT: None

active

Whether the channel is active.

TYPE: bool | None DEFAULT: None

run_id

The run ID to get.

TYPE: str | None DEFAULT: None

run_name

The name of the run to get.

TYPE: str | None DEFAULT: None

client_key

The client key of the run to get.

TYPE: str | None DEFAULT: None

created_before

The created date of the channel to get.

TYPE: datetime | None DEFAULT: None

created_after

The created date of the channel to get.

TYPE: datetime | None DEFAULT: None

modified_before

The modified date of the channel to get.

TYPE: datetime | None DEFAULT: None

modified_after

The modified date of the channel to get.

TYPE: datetime | None DEFAULT: None

order_by

How to order the retrieved channels.

TYPE: str | None DEFAULT: None

limit

How many channels to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

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: SiftClient

METHOD DESCRIPTION
find

Find a single channel matching the given query. Takes the same arguments as list. If more than one channel is found,

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 list.

DEFAULT: {}

RETURNS DESCRIPTION
Channel | None

The Channel found or None.

get async

get(*, channel_id: str) -> Channel

Get a Channel.

PARAMETER DESCRIPTION
channel_id

The ID of the channel.

TYPE: str

RETURNS DESCRIPTION
Channel

The Channel.

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.

TYPE: list[Channel]

run_id

The run to get data for.

TYPE: str | None DEFAULT: None

start_time

The start time to get data for.

TYPE: datetime | None DEFAULT: None

end_time

The end time to get data for.

TYPE: datetime | None DEFAULT: None

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: int | None DEFAULT: None

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: str | None DEFAULT: None

name

The name of the channel to get.

TYPE: str | None DEFAULT: None

name_contains

The partial name of the channel to get.

TYPE: str | None DEFAULT: None

name_regex

The regex name of the channel to get.

TYPE: str | Pattern | None DEFAULT: None

description

The description of the channel to get.

TYPE: str | None DEFAULT: None

description_contains

The partial description of the channel to get.

TYPE: str | None DEFAULT: None

active

Whether the channel is active.

TYPE: bool | None DEFAULT: None

run_id

The run ID to get.

TYPE: str | None DEFAULT: None

run_name

The name of the run to get.

TYPE: str | None DEFAULT: None

client_key

The client key of the run to get.

TYPE: str | None DEFAULT: None

created_before

The created date of the channel to get.

TYPE: datetime | None DEFAULT: None

created_after

The created date of the channel to get.

TYPE: datetime | None DEFAULT: None

modified_before

The modified date of the channel to get.

TYPE: datetime | None DEFAULT: None

modified_after

The modified date of the channel to get.

TYPE: datetime | None DEFAULT: None

order_by

How to order the retrieved channels.

TYPE: str | None DEFAULT: None

limit

How many channels to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

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: SiftClient

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: str

run_id

Optionally provide a run ID to create a run for the given asset.

TYPE: str | None DEFAULT: None

flows

List of flow configurations.

TYPE: list[Flow]

client_key

Optional client key for identifying this config.

TYPE: str | None DEFAULT: None

organization_id

The organization ID.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
str

The ingestion config ID.

RAISES DESCRIPTION
ValueError

If asset_name is not provided or flows is empty.

ingest

ingest(
    *,
    flow: Flow,
    timestamp: datetime,
    channel_values: dict[str, Any],
)

Ingest data for a flow.

PARAMETER DESCRIPTION
flow

The flow to ingest data for.

TYPE: Flow

timestamp

The timestamp of the data.

TYPE: datetime

channel_values

Dictionary mapping channel names to their values.

TYPE: dict[str, Any]

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: float | None DEFAULT: None

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: SiftClient

METHOD DESCRIPTION
ping

Send a ping request to the server.

ping

ping() -> str

Send a ping request to the server.

RETURNS DESCRIPTION
str

The response from 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: SiftClient

METHOD DESCRIPTION
ping

Send a ping request to the server.

ping async

ping() -> str

Send a ping request to the server.

RETURNS DESCRIPTION
str

The response from 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: SiftClient

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 list. If more than one rule is found,

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.

TYPE: str | Rule | None DEFAULT: None

rules

The Rules to archive.

TYPE: list[Rule] | None DEFAULT: None

rule_ids

The rule IDs to archive.

TYPE: list[str] | None DEFAULT: None

client_keys

The client keys to archive.

TYPE: list[str] | None DEFAULT: None

batch_get

batch_get(
    *,
    rule_ids: list[str] | None = None,
    client_keys: list[str] | None = None,
) -> list[Rule]

Get multiple rules by rule IDs or client keys.

PARAMETER DESCRIPTION
rule_ids

List of rule IDs to get.

TYPE: list[str] | None DEFAULT: None

client_keys

List of client keys to get.

TYPE: list[str] | None DEFAULT: None

RETURNS DESCRIPTION
list[Rule]

List of Rules.

batch_restore

batch_restore(
    *,
    rule_ids: list[str] | None = None,
    client_keys: list[str] | None = None,
) -> None

Batch restore rules.

PARAMETER DESCRIPTION
rule_ids

List of rule IDs to restore.

TYPE: list[str] | None DEFAULT: None

client_keys

List of client keys to undelete.

TYPE: list[str] | None DEFAULT: None

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 list.

DEFAULT: {}

RETURNS DESCRIPTION
Rule | None

The Rule found or None.

get

get(
    *,
    rule_id: str | None = None,
    client_key: str | None = None,
) -> Rule

Get a Rule.

PARAMETER DESCRIPTION
rule_id

The ID of the rule.

TYPE: str | None DEFAULT: None

client_key

The client key of the rule.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Rule

The Rule.

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: str | None DEFAULT: None

name_contains

Partial name of the rule.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter rules by name.

TYPE: str | Pattern | None DEFAULT: None

order_by

How to order the retrieved rules.

TYPE: str | None DEFAULT: None

limit

How many rules to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

include_deleted

Include deleted rules.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
list[Rule]

A list of Rules that matches the filter.

restore

restore(
    *,
    rule: str | Rule,
    rule_id: str | None = None,
    client_key: str | None = None,
) -> Rule

Restore a rule.

PARAMETER DESCRIPTION
rule

The Rule or rule ID to restore.

TYPE: str | Rule

rule_id

The rule ID to restore (alternative to rule parameter).

TYPE: str | None DEFAULT: None

client_key

The client key to restore (alternative to rule parameter).

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Rule

The restored Rule.

update

update(
    rule: str | Rule,
    update: RuleUpdate | dict,
    version_notes: str | None = None,
) -> Rule

Update a Rule.

PARAMETER DESCRIPTION
rule

The Rule or rule ID to update.

TYPE: str | Rule

update

Updates to apply to the Rule.

TYPE: RuleUpdate | dict

version_notes

Notes to include in the rule version.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Rule

The updated Rule.

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: SiftClient

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 list. If more than one rule is found,

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.

TYPE: str | Rule | None DEFAULT: None

rules

The Rules to archive.

TYPE: list[Rule] | None DEFAULT: None

rule_ids

The rule IDs to archive.

TYPE: list[str] | None DEFAULT: None

client_keys

The client keys to archive.

TYPE: list[str] | None DEFAULT: None

batch_get async

batch_get(
    *,
    rule_ids: list[str] | None = None,
    client_keys: list[str] | None = None,
) -> list[Rule]

Get multiple rules by rule IDs or client keys.

PARAMETER DESCRIPTION
rule_ids

List of rule IDs to get.

TYPE: list[str] | None DEFAULT: None

client_keys

List of client keys to get.

TYPE: list[str] | None DEFAULT: None

RETURNS DESCRIPTION
list[Rule]

List of Rules.

batch_restore async

batch_restore(
    *,
    rule_ids: list[str] | None = None,
    client_keys: list[str] | None = None,
) -> None

Batch restore rules.

PARAMETER DESCRIPTION
rule_ids

List of rule IDs to restore.

TYPE: list[str] | None DEFAULT: None

client_keys

List of client keys to undelete.

TYPE: list[str] | None DEFAULT: None

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 list.

DEFAULT: {}

RETURNS DESCRIPTION
Rule | None

The Rule found or None.

get async

get(
    *,
    rule_id: str | None = None,
    client_key: str | None = None,
) -> Rule

Get a Rule.

PARAMETER DESCRIPTION
rule_id

The ID of the rule.

TYPE: str | None DEFAULT: None

client_key

The client key of the rule.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Rule

The Rule.

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: str | None DEFAULT: None

name_contains

Partial name of the rule.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter rules by name.

TYPE: str | Pattern | None DEFAULT: None

order_by

How to order the retrieved rules.

TYPE: str | None DEFAULT: None

limit

How many rules to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

include_deleted

Include deleted rules.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
list[Rule]

A list of Rules that matches the filter.

restore async

restore(
    *,
    rule: str | Rule,
    rule_id: str | None = None,
    client_key: str | None = None,
) -> Rule

Restore a rule.

PARAMETER DESCRIPTION
rule

The Rule or rule ID to restore.

TYPE: str | Rule

rule_id

The rule ID to restore (alternative to rule parameter).

TYPE: str | None DEFAULT: None

client_key

The client key to restore (alternative to rule parameter).

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Rule

The restored Rule.

update async

update(
    rule: str | Rule,
    update: RuleUpdate | dict,
    version_notes: str | None = None,
) -> Rule

Update a Rule.

PARAMETER DESCRIPTION
rule

The Rule or rule ID to update.

TYPE: str | Rule

update

Updates to apply to the Rule.

TYPE: RuleUpdate | dict

version_notes

Notes to include in the rule version.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Rule

The updated Rule.

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: SiftClient

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 list. If more than one run is found,

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

archive(*, run: str | Run) -> None

Archive a run.

PARAMETER DESCRIPTION
run

The Run or run ID to archive.

TYPE: str | Run

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: str

description

The description of the run.

TYPE: str

tags

Tags to associate with the run.

TYPE: list[str] | None DEFAULT: None

start_time

The start time of the run.

TYPE: datetime | None DEFAULT: None

stop_time

The stop time of the run.

TYPE: datetime | None DEFAULT: None

organization_id

The organization ID.

TYPE: str | None DEFAULT: None

client_key

A unique client key for the run.

TYPE: str | None DEFAULT: None

metadata

Metadata values for the run.

TYPE: dict[str, str | float | bool] | None DEFAULT: None

RETURNS DESCRIPTION
Run

The created Run.

create_automatic_association_for_assets

create_automatic_association_for_assets(
    run: str | Run, asset_names: list[str]
) -> None

Associate assets with a run for automatic data ingestion.

PARAMETER DESCRIPTION
run

The Run or run ID.

TYPE: str | Run

asset_names

List of asset names to associate.

TYPE: list[str]

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 list.

DEFAULT: {}

RETURNS DESCRIPTION
Run | None

The Run found or None.

get

get(*, run_id: str) -> Run

Get a Run.

PARAMETER DESCRIPTION
run_id

The ID of the run.

TYPE: str

RETURNS DESCRIPTION
Run

The Run.

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: str | None DEFAULT: None

name_contains

Partial name of the run.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter runs by name.

TYPE: str | Pattern | None DEFAULT: None

description

Exact description of the run.

TYPE: str | None DEFAULT: None

description_contains

Partial description of the run.

TYPE: str | None DEFAULT: None

duration_seconds

Duration of the run in seconds.

TYPE: int | None DEFAULT: None

client_key

Client key to filter by.

TYPE: str | None DEFAULT: None

asset_id

Asset ID to filter by.

TYPE: str | None DEFAULT: None

asset_name

Asset name to filter by.

TYPE: str | None DEFAULT: None

created_by_user_id

User ID who created the run.

TYPE: str | None DEFAULT: None

is_stopped

Whether the run is stopped.

TYPE: bool | None DEFAULT: None

include_archived

Whether to include archived runs.

TYPE: bool DEFAULT: False

order_by

How to order the retrieved runs.

TYPE: str | None DEFAULT: None

limit

How many runs to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

RETURNS DESCRIPTION
list[Run]

A list of Runs that matches the filter.

stop

stop(*, run: str | Run) -> None

Stop a run by setting its stop time to the current time.

PARAMETER DESCRIPTION
run

The Run or run ID to stop.

TYPE: str | Run

stop_run

stop_run(run: str | Run) -> None

Stop a run by setting its stop time to the current time.

PARAMETER DESCRIPTION
run

The Run or run ID to stop.

TYPE: str | Run

update

update(run: str | Run, update: RunUpdate | dict) -> Run

Update a Run.

PARAMETER DESCRIPTION
run

The Run or run ID to update.

TYPE: str | Run

update

Updates to apply to the Run.

TYPE: RunUpdate | dict

RETURNS DESCRIPTION
Run

The updated 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: SiftClient

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 list. If more than one run is found,

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

archive(*, run: str | Run) -> None

Archive a run.

PARAMETER DESCRIPTION
run

The Run or run ID to archive.

TYPE: str | Run

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: str

description

The description of the run.

TYPE: str

tags

Tags to associate with the run.

TYPE: list[str] | None DEFAULT: None

start_time

The start time of the run.

TYPE: datetime | None DEFAULT: None

stop_time

The stop time of the run.

TYPE: datetime | None DEFAULT: None

organization_id

The organization ID.

TYPE: str | None DEFAULT: None

client_key

A unique client key for the run.

TYPE: str | None DEFAULT: None

metadata

Metadata values for the run.

TYPE: dict[str, str | float | bool] | None DEFAULT: None

RETURNS DESCRIPTION
Run

The created Run.

create_automatic_association_for_assets async

create_automatic_association_for_assets(
    run: str | Run, asset_names: list[str]
) -> None

Associate assets with a run for automatic data ingestion.

PARAMETER DESCRIPTION
run

The Run or run ID.

TYPE: str | Run

asset_names

List of asset names to associate.

TYPE: list[str]

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 list.

DEFAULT: {}

RETURNS DESCRIPTION
Run | None

The Run found or None.

get async

get(*, run_id: str) -> Run

Get a Run.

PARAMETER DESCRIPTION
run_id

The ID of the run.

TYPE: str

RETURNS DESCRIPTION
Run

The Run.

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: str | None DEFAULT: None

name_contains

Partial name of the run.

TYPE: str | None DEFAULT: None

name_regex

Regular expression string to filter runs by name.

TYPE: str | Pattern | None DEFAULT: None

description

Exact description of the run.

TYPE: str | None DEFAULT: None

description_contains

Partial description of the run.

TYPE: str | None DEFAULT: None

duration_seconds

Duration of the run in seconds.

TYPE: int | None DEFAULT: None

client_key

Client key to filter by.

TYPE: str | None DEFAULT: None

asset_id

Asset ID to filter by.

TYPE: str | None DEFAULT: None

asset_name

Asset name to filter by.

TYPE: str | None DEFAULT: None

created_by_user_id

User ID who created the run.

TYPE: str | None DEFAULT: None

is_stopped

Whether the run is stopped.

TYPE: bool | None DEFAULT: None

include_archived

Whether to include archived runs.

TYPE: bool DEFAULT: False

order_by

How to order the retrieved runs.

TYPE: str | None DEFAULT: None

limit

How many runs to retrieve. If None, retrieves all matches.

TYPE: int | None DEFAULT: None

RETURNS DESCRIPTION
list[Run]

A list of Runs that matches the filter.

stop async

stop(*, run: str | Run) -> None

Stop a run by setting its stop time to the current time.

PARAMETER DESCRIPTION
run

The Run or run ID to stop.

TYPE: str | Run

stop_run async

stop_run(run: str | Run) -> None

Stop a run by setting its stop time to the current time.

PARAMETER DESCRIPTION
run

The Run or run ID to stop.

TYPE: str | Run

update async

update(run: str | Run, update: RunUpdate | dict) -> Run

Update a Run.

PARAMETER DESCRIPTION
run

The Run or run ID to update.

TYPE: str | Run

update

Updates to apply to the Run.

TYPE: RunUpdate | dict

RETURNS DESCRIPTION
Run

The updated Run.