Skip to content

sift_py.ingestion.flow

CLASS DESCRIPTION
Flow

Represents a single flow that will be sent to Sift. Because this class uses sift_py.ingestion.channel.ChannelValue

FlowConfig

Describes a flow which is a set of channels whose values are often ingested together, allowing

FlowOrderedChannelValues

Represents a single flow that will be sent to Sift. Unlike sift_py.ingestion.flow.Flow, this class requires

Flow

Bases: TypedDict

Represents a single flow that will be sent to Sift. Because this class uses sift_py.ingestion.channel.ChannelValue which is a fully qualified channel value, a specific ordering of items in channel_values is not required. If a particular flow has 5 channels, it is okay to send only data for 3 channels using this class.

ATTRIBUTE DESCRIPTION
channel_values

TYPE: List[ChannelValue]

flow_name

TYPE: str

timestamp

TYPE: datetime

channel_values instance-attribute

channel_values: List[ChannelValue]

flow_name instance-attribute

flow_name: str

timestamp instance-attribute

timestamp: datetime

FlowConfig

FlowConfig(name: str, channels: List[ChannelConfig])

Bases: AsProtobuf

Describes a flow which is a set of channels whose values are often ingested together, allowing users to send multiple data points for multiple channels in a single request.

channel_by_fqn: A mapping of a channel's fully-qualified name to the index of the sift_py.ingestion.channel.ChannelConfig as it appears in the channels attribute.

METHOD DESCRIPTION
as_pb
from_pb
ATTRIBUTE DESCRIPTION
channel_by_fqn

TYPE: Dict[str, int]

channels

TYPE: List[ChannelConfig]

name

TYPE: str

channel_by_fqn instance-attribute

channel_by_fqn: Dict[str, int] = {
    (channel_fqn(c)): _yfor(i, c)
    in (enumerate(channels))
}

channels instance-attribute

channels: List[ChannelConfig] = channels

name instance-attribute

name: str = name

as_pb

as_pb(klass: Type[FlowConfig]) -> FlowConfig

from_pb classmethod

from_pb(message: FlowConfig) -> Self

FlowOrderedChannelValues

Bases: TypedDict

Represents a single flow that will be sent to Sift. Unlike sift_py.ingestion.flow.Flow, this class requires that the ordering of channel values in channel_values match what the flow associated with flow_name expects. If a channel doesn't have particular data to send for a particular time, sift_py.ingestion.channel.empty_value should be used

ATTRIBUTE DESCRIPTION
channel_values

TYPE: List[IngestWithConfigDataChannelValue]

flow_name

TYPE: str

timestamp

TYPE: datetime

channel_values instance-attribute

channel_values: List[IngestWithConfigDataChannelValue]

flow_name instance-attribute

flow_name: str

timestamp instance-attribute

timestamp: datetime