sift_py.calculated_channels.config
¶
| CLASS | DESCRIPTION |
|---|---|
CalculatedChannelConfig |
Configuration for a calculated channel. |
CalculatedChannelUpdate |
Represents a dictionary for updating properties of a calculated channel. All fields are optional |
CalculatedChannelConfig
¶
Bases: BaseModel
Configuration for a calculated channel.
name: Name of the calculated channel.description: Description of the calculated channel.expression: The expression to calculate the value of the calculated channel.channel_references: A list of channel references that are used in the expression. Each reference can either be anExpressionChannelReferenceorExpressionChannelReferenceChannelConfig.units: Units of the calculated channel.client_key: A user defined string that uniquely identifies the calculated channel. Name is unique, but may be changed.asset_names: A list of asset names to make the calculation available for.tags: A list of tags on assets to make the calculation available for. NOTE: Not yet supported.all_assets: A flag that, when set toTrue, associates the calculated channel with all assets.
| METHOD | DESCRIPTION |
|---|---|
check_for_unsupported_tags |
|
convert_channel_references |
|
validate_assets |
|
| ATTRIBUTE | DESCRIPTION |
|---|---|
all_assets |
TYPE:
|
asset_names |
|
calculated_channel_id |
|
channel_references |
TYPE:
|
client_key |
|
description |
TYPE:
|
expression |
TYPE:
|
model_config |
|
name |
TYPE:
|
tag_names |
|
units |
|
calculated_channel_id
class-attribute
instance-attribute
¶
channel_references
instance-attribute
¶
channel_references: List[
Union[
ExpressionChannelReference,
ExpressionChannelReferenceChannelConfig,
]
]
model_config
class-attribute
instance-attribute
¶
convert_channel_references
classmethod
¶
convert_channel_references(
raw: List[
Union[
ExpressionChannelReference,
ExpressionChannelReferenceChannelConfig,
]
],
) -> List[ExpressionChannelReference]
CalculatedChannelUpdate
¶
Bases: TypedDict
Represents a dictionary for updating properties of a calculated channel. All fields are optional and only the provided fields will be updated.
name: Updated name of the calculated channel.description: Updated description of the calculated channel.units: String representing the units for the calculated channel.expression: Updated expression used to calculate channel values.channel_references: A list of channel references which can either beExpressionChannelReferenceorExpressionChannelReferenceChannelConfigused in the expression.asset_names: List of assets associated with the calculation.tags: List of tags for associating the calculated channel to assets.all_assets: Boolean flag indicating if the calculated channel applies to all assets.archived: Boolean flag indicating if the calculated channel is archived.
| ATTRIBUTE | DESCRIPTION |
|---|---|
all_assets |
TYPE:
|
archived |
TYPE:
|
asset_names |
|
channel_references |
TYPE:
|
description |
TYPE:
|
expression |
TYPE:
|
name |
TYPE:
|
tag_names |
|
units |
TYPE:
|
channel_references
instance-attribute
¶
channel_references: NotRequired[
List[
Union[
ExpressionChannelReference,
ExpressionChannelReferenceChannelConfig,
]
]
]