Skip to content

sift_py.calculated_channels.service

CLASS DESCRIPTION
CalculatedChannelService

A service for managing reusable Calculated Channels. Allows for creating, updating, and retrieving Calculated Channels.

CalculatedChannelService

CalculatedChannelService(channel: SiftChannel)

A service for managing reusable Calculated Channels. Allows for creating, updating, and retrieving Calculated Channels.

METHOD DESCRIPTION
create_calculated_channel

Create a CalculatedChannel from a CalculatedChannelConfig. See

create_or_update_calculated_channel_from_yaml

Creates or updates calculated channel from provided yaml files.

get_calculated_channel

Get a CalculatedChannel. See Sift docs_

list_calculated_channel_versions

List versions of Calculated Channel. See Sift docs_

list_calculated_channels

List available Calculated Channels. See Sift docs_

update_calculated_channel

Revise a CalculatedChannel from a CalculatedChannelUpdate. See

create_calculated_channel

create_calculated_channel(
    config: CalculatedChannelConfig,
) -> Tuple[
    CalculatedChannelConfig,
    CalculatedChannelValidationResult,
]

Create a CalculatedChannel from a CalculatedChannelConfig. See sift_py.calculated_channels.config.CalculatedChannelConfig for more information on available fields to configure.

create_or_update_calculated_channel_from_yaml

create_or_update_calculated_channel_from_yaml(
    paths: Union[Path, List[Path]],
) -> List[
    Tuple[
        CalculatedChannelConfig,
        CalculatedChannelValidationResult,
    ]
]

Creates or updates calculated channel from provided yaml files.

get_calculated_channel

get_calculated_channel(
    calculated_channel_id: Optional[str] = None,
    client_key: Optional[str] = None,
) -> CalculatedChannelConfig

Get a CalculatedChannel. See Sift docs_ for more information on available arguments.

.. _Sift docs: https://docs.siftstack.com/docs/api/grpc/protocol-buffers/calculated_channels

list_calculated_channel_versions

list_calculated_channel_versions(
    calculated_channel_id: Optional[str] = None,
    client_key: Optional[str] = None,
    page_size: Optional[int] = None,
    page_token: Optional[str] = None,
    filter: Optional[str] = None,
    order_by: Optional[str] = None,
) -> Tuple[List[CalculatedChannelConfig], str]

List versions of Calculated Channel. See Sift docs_ for more information on available arguments.

Returns a tuple of a list of CalculatedChannel objects and a next page token.

.. _Sift docs: https://docs.siftstack.com/docs/api/grpc/protocol-buffers/calculated_channels

list_calculated_channels

list_calculated_channels(
    page_size: Optional[int] = None,
    page_token: Optional[str] = None,
    filter: Optional[str] = None,
    order_by: Optional[str] = None,
) -> Tuple[List[CalculatedChannelConfig], str]

List available Calculated Channels. See Sift docs_ for more information on available arguments.

Returns a tuple of a list of CalculatedChannel objects and a next page token.

.. _Sift docs: https://docs.siftstack.com/docs/api/grpc/protocol-buffers/calculated_channels

update_calculated_channel

update_calculated_channel(
    calculated_channel_config: CalculatedChannelConfig,
    updates: CalculatedChannelUpdate,
    update_notes: str = "",
) -> Tuple[
    CalculatedChannelConfig,
    CalculatedChannelValidationResult,
]

Revise a CalculatedChannel from a CalculatedChannelUpdate. See sift_py.calculated_channels.config.CalculatedChannelUpdate for more information on available fields to update.

revision_notes may be provided to document the reason for revision.