Targets (🧪Beta)
albert.resources.targets
TargetType
Enumeration of target types.
Attributes:
| Name | Type | Description |
|---|---|---|
PERFORMANCE |
str
|
A performance target. |
TargetOperator
TargetParameter
Bases: BaseAlbertModel
Represents a parameter value at which a target is measured.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
The parameter ID. |
parameter_group_id |
str | None
|
The parameter group ID. |
category |
ParameterCategory
|
The parameter category. |
unit_id |
str | None
|
The unit ID for this parameter. |
value |
str | float | None
|
The parameter value. |
sequence |
str
|
The parameter sequence. |
Show JSON schema:
{
"$defs": {
"ParameterCategory": {
"description": "The category of a parameter",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
}
},
"description": "Represents a parameter value at which a target is measured.\n\nAttributes\n----------\nid : str\n The parameter ID.\nparameter_group_id : str | None\n The parameter group ID.\ncategory : ParameterCategory\n The parameter category.\nunit_id : str | None\n The unit ID for this parameter.\nvalue : str | float | None\n The parameter value.\nsequence : str\n The parameter sequence.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parametergroupid"
},
"category": {
"$ref": "#/$defs/ParameterCategory"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Unitid"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"sequence": {
"title": "Sequence",
"type": "string"
}
},
"required": [
"id",
"category",
"sequence"
],
"title": "TargetParameter",
"type": "object"
}
Fields:
-
id(ParameterId) -
parameter_group_id(ParameterGroupId | None) -
category(ParameterCategory) -
unit_id(UnitId | None) -
value(str | float | None) -
sequence(str)
TargetRangeValue
Bases: BaseAlbertModel
Represents a range value for a target (used with the 'between' operator).
Attributes:
| Name | Type | Description |
|---|---|---|
min |
float
|
The minimum value. |
max |
float
|
The maximum value. |
Show JSON schema:
{
"description": "Represents a range value for a target (used with the 'between' operator).\n\nAttributes\n----------\nmin : float\n The minimum value.\nmax : float\n The maximum value.",
"properties": {
"min": {
"title": "Min",
"type": "number"
},
"max": {
"title": "Max",
"type": "number"
}
},
"required": [
"min",
"max"
],
"title": "TargetRangeValue",
"type": "object"
}
Fields:
TargetValue
Bases: BaseAlbertModel
Represents the target value constraint.
Attributes:
| Name | Type | Description |
|---|---|---|
operator |
TargetOperator
|
The comparison operator. |
value |
TargetRangeValue | str | float | list
|
The target value. Can be a range, single value, or list of values. |
Show JSON schema:
{
"$defs": {
"TargetOperator": {
"description": "Enumeration of target value comparison operators.\n\nAttributes\n----------\nEQ : str\n Equal to.\nGTE : str\n Greater than or equal to.\nLTE : str\n Less than or equal to.\nBETWEEN : str\n Between a range.\nIN_SET : str\n In a set of values.",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"between",
"in-set"
],
"title": "TargetOperator",
"type": "string"
},
"TargetRangeValue": {
"description": "Represents a range value for a target (used with the 'between' operator).\n\nAttributes\n----------\nmin : float\n The minimum value.\nmax : float\n The maximum value.",
"properties": {
"min": {
"title": "Min",
"type": "number"
},
"max": {
"title": "Max",
"type": "number"
}
},
"required": [
"min",
"max"
],
"title": "TargetRangeValue",
"type": "object"
}
},
"description": "Represents the target value constraint.\n\nAttributes\n----------\noperator : TargetOperator\n The comparison operator.\nvalue : TargetRangeValue | str | float | list\n The target value. Can be a range, single value, or list of values.",
"properties": {
"operator": {
"$ref": "#/$defs/TargetOperator"
},
"value": {
"anyOf": [
{
"$ref": "#/$defs/TargetRangeValue"
},
{
"type": "string"
},
{
"type": "number"
},
{
"items": {},
"type": "array"
}
],
"title": "Value"
}
},
"required": [
"operator",
"value"
],
"title": "TargetValue",
"type": "object"
}
Fields:
-
operator(TargetOperator) -
value(TargetRangeValue | str | float | list)
Target
Bases: BaseResource
Represents a target entity.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
The unique identifier of the target. Set when retrieved from Albert. |
name |
str
|
The name of the target. |
type |
TargetType
|
The type of target. |
data_template_id |
str
|
The ID of the associated data template. |
data_column_id |
str
|
The ID of the associated data column. |
unit_id |
str | None
|
The unit ID for this target. |
parameters |
list[TargetParameter] | None
|
Parameter mappings for the target. |
validation |
list[dict] | None
|
Validation rules for the target value. |
target_value |
TargetValue
|
The target value constraint. |
is_required |
bool
|
Whether this target is required. |
validation |
list[dict] | None
|
Validation rules for the target. |