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
TelemetryConfigYamlSpec

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

FlowYamlSpec

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

YamlConfigError

When the YAML config has missing or invalid properties.

ATTRIBUTE DESCRIPTION
RuleYamlSpec

NamedExpressionYamlSpec

ChannelConfigYamlSpec

ChannelEnumTypeYamlSpec

ChannelBitFieldElementYamlSpec

RuleYamlSpec module-attribute

RuleYamlSpec = rule_yaml.RuleYamlSpec

NamedExpressionYamlSpec module-attribute

NamedExpressionYamlSpec = rule_yaml.NamedExpressionYamlSpec

ChannelConfigYamlSpec module-attribute

ChannelConfigYamlSpec = channel_yaml.ChannelConfigYamlSpec

ChannelEnumTypeYamlSpec module-attribute

ChannelEnumTypeYamlSpec = (
    channel_yaml.ChannelEnumTypeYamlSpec
)

ChannelBitFieldElementYamlSpec module-attribute

ChannelBitFieldElementYamlSpec = (
    channel_yaml.ChannelBitFieldElementYamlSpec
)

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

ingestion_client_key

TYPE: NotRequired[str]

organization_id

TYPE: NotRequired[str]

channels

TYPE: Dict[str, ChannelConfigYamlSpec]

rules

TYPE: NotRequired[List[RuleYamlSpec]]

flows

TYPE: NotRequired[List[FlowYamlSpec]]

asset_name instance-attribute

asset_name: str

ingestion_client_key instance-attribute

ingestion_client_key: NotRequired[str]

organization_id instance-attribute

organization_id: NotRequired[str]

channels instance-attribute

channels: Dict[str, ChannelConfigYamlSpec]

rules instance-attribute

rules: NotRequired[List[RuleYamlSpec]]

flows instance-attribute

flows: NotRequired[List[FlowYamlSpec]]

FlowYamlSpec

Bases: TypedDict

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

ATTRIBUTE DESCRIPTION
name

TYPE: str

channels

TYPE: List[ChannelConfigYamlSpec]

name instance-attribute

name: str

channels instance-attribute

channels: List[ChannelConfigYamlSpec]

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