Skip to content

sift_py.ingestion.config.yaml.spec

Formal specification of the types that sift_py expects when loading a telemetry config from a YAML file.

CLASS DESCRIPTION
FlowYamlSpec

Formal spec that defines what a flow should look like in YAML.

TelemetryConfigYamlSpec

Formal spec that defines what the telemetry config should look like in YAML.

YamlConfigError

When the YAML config has missing or invalid properties.

ATTRIBUTE DESCRIPTION
ChannelBitFieldElementYamlSpec

ChannelConfigYamlSpec

ChannelEnumTypeYamlSpec

NamedExpressionYamlSpec

RuleYamlSpec

ChannelBitFieldElementYamlSpec module-attribute

ChannelBitFieldElementYamlSpec = (
    ChannelBitFieldElementYamlSpec
)

ChannelConfigYamlSpec module-attribute

ChannelConfigYamlSpec = ChannelConfigYamlSpec

ChannelEnumTypeYamlSpec module-attribute

ChannelEnumTypeYamlSpec = ChannelEnumTypeYamlSpec

NamedExpressionYamlSpec module-attribute

NamedExpressionYamlSpec = NamedExpressionYamlSpec

RuleYamlSpec module-attribute

RuleYamlSpec = RuleYamlSpec

FlowYamlSpec

Bases: TypedDict

Formal spec that defines what a flow should look like in YAML.

ATTRIBUTE DESCRIPTION
channels

TYPE: List[ChannelConfigYamlSpec]

name

TYPE: str

channels instance-attribute

name instance-attribute

name: str

TelemetryConfigYamlSpec

Bases: TypedDict

Formal spec that defines what the telemetry config should look like in YAML.

asset_name: The name of the asset to telemeter. ingestion_client_key: Optional user-defined string-key that uniquely identifies this telemetry config. organization_id: Optional ID of user's organization. Required if user belongs to multiple orgs. channels: Sensors that send the data. rules: Rules that, when evaluated to a true, will perform some sort of acction. flows: A list of named groups of channels that send data together.

ATTRIBUTE DESCRIPTION
asset_name

TYPE: str

channels

TYPE: Dict[str, ChannelConfigYamlSpec]

flows

TYPE: NotRequired[List[FlowYamlSpec]]

ingestion_client_key

TYPE: NotRequired[str]

organization_id

TYPE: NotRequired[str]

rules

TYPE: NotRequired[List[RuleYamlSpec]]

asset_name instance-attribute

asset_name: str

channels instance-attribute

flows instance-attribute

flows: NotRequired[List[FlowYamlSpec]]

ingestion_client_key instance-attribute

ingestion_client_key: NotRequired[str]

organization_id instance-attribute

organization_id: NotRequired[str]

rules instance-attribute

rules: NotRequired[List[RuleYamlSpec]]

YamlConfigError

YamlConfigError(message: str)

Bases: Exception

When the YAML config has missing or invalid properties.

ATTRIBUTE DESCRIPTION
message

TYPE: str

message instance-attribute

message: str