Skip to content

sift_client.client

CLASS DESCRIPTION
SiftClient

SiftClient is a high-level client for interacting with Sift's APIs.

SiftClient

SiftClient(
    api_key: str | None = None,
    grpc_url: str | None = None,
    rest_url: str | None = None,
    connection_config: SiftConnectionConfig | None = None,
)

Bases: WithGrpcClient, WithRestClient

SiftClient is a high-level client for interacting with Sift's APIs.

It provides both synchronous and asynchronous interfaces, strong type checking, and a Pythonic API design.

Warning

The Sift Client is experimental and is subject to change.

Initialize the SiftClient with specific connection parameters or a connection_config.

PARAMETER DESCRIPTION
api_key

The Sift API key for authentication.

TYPE: str | None DEFAULT: None

grpc_url

The Sift gRPC API URL.

TYPE: str | None DEFAULT: None

rest_url

The Sift REST API URL.

TYPE: str | None DEFAULT: None

connection_config

A SiftConnectionConfig object to configure the connection behavior of the SiftClient.

TYPE: SiftConnectionConfig | None DEFAULT: None

ATTRIBUTE DESCRIPTION
assets

Instance of the Assets API for making synchronous requests.

TYPE: AssetsAPI

async_

Accessor for the asynchronous APIs. All asynchronous APIs are available as attributes on this accessor.

TYPE: AsyncAPIs

calculated_channels

Instance of the Calculated Channels API for making synchronous requests.

TYPE: CalculatedChannelsAPI

channels

Instance of the Channels API for making synchronous requests.

TYPE: ChannelsAPI

grpc_client

The gRPC client used by the SiftClient for making gRPC API calls.

TYPE: GrpcClient

ingestion

Instance of the Ingestion API for making synchronous requests.

TYPE: IngestionAPIAsync

ping

Instance of the Ping API for making synchronous requests.

TYPE: PingAPI

rest_client

The REST client used by the SiftClient for making REST API calls.

TYPE: RestClient

rules

Instance of the Rules API for making synchronous requests.

TYPE: RulesAPI

runs

Instance of the Runs API for making synchronous requests.

TYPE: RunsAPI

assets instance-attribute

assets: AssetsAPI = AssetsAPI(self)

Instance of the Assets API for making synchronous requests.

async_ instance-attribute

async_: AsyncAPIs = AsyncAPIs(
    ping=PingAPIAsync(self),
    assets=AssetsAPIAsync(self),
    calculated_channels=CalculatedChannelsAPIAsync(self),
    channels=ChannelsAPIAsync(self),
    ingestion=IngestionAPIAsync(self),
    rules=RulesAPIAsync(self),
    runs=RunsAPIAsync(self),
)

Accessor for the asynchronous APIs. All asynchronous APIs are available as attributes on this accessor.

calculated_channels instance-attribute

calculated_channels: CalculatedChannelsAPI = (
    CalculatedChannelsAPI(self)
)

Instance of the Calculated Channels API for making synchronous requests.

channels instance-attribute

channels: ChannelsAPI = ChannelsAPI(self)

Instance of the Channels API for making synchronous requests.

grpc_client property

grpc_client: GrpcClient

The gRPC client used by the SiftClient for making gRPC API calls.

ingestion instance-attribute

Instance of the Ingestion API for making synchronous requests.

ping instance-attribute

ping: PingAPI = PingAPI(self)

Instance of the Ping API for making synchronous requests.

rest_client property

rest_client: RestClient

The REST client used by the SiftClient for making REST API calls.

rules instance-attribute

rules: RulesAPI = RulesAPI(self)

Instance of the Rules API for making synchronous requests.

runs instance-attribute

runs: RunsAPI = RunsAPI(self)

Instance of the Runs API for making synchronous requests.