Parameters
albert.resources.parameters
ParameterCategory
Whether a Parameter's value is a plain scalar or an entity reference.
Set by the platform and read-only. It determines how a parameter's value is
interpreted when a setpoint is assigned to it inside a
Workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
NORMAL |
str
|
A "normal" parameter whose value is a plain scalar (e.g. a number or text), such as Temperature or Spin Speed. |
SPECIAL |
str
|
A "special" parameter whose value references another entity (e.g. Equipment, a Consumable, or a Template). The setpoint value is that entity's ID rather than a plain scalar. |
Parameter
Bases: BaseResource
The definition of a single experimental condition or input variable.
A Parameter (ID format PRM...) names an "indirect variable" such as
Temperature, Spin Speed, or Instrument. The Parameter itself only defines the
variable; its actual value and unit are fixed to a setpoint later, inside a
Workflow. Parameters are the building
blocks of Parameter Groups
(ParameterGroup) and form the
parameter side of Data Templates
(DataTemplate).
Manage parameters through
ParameterCollection
(client.parameters).
Example
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EntityLinkWithName": {
"description": "EntityLink that includes the name field in serialization.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLinkWithName",
"type": "object"
},
"ParameterCategory": {
"description": "Whether a [`Parameter`][albert.resources.parameters.Parameter]'s value is a plain scalar or an entity reference.\n\nSet by the platform and read-only. It determines how a parameter's value is\ninterpreted when a setpoint is assigned to it inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nAttributes\n----------\nNORMAL : str\n A \"normal\" parameter whose value is a plain scalar (e.g. a number or text),\n such as Temperature or Spin Speed.\nSPECIAL : str\n A \"special\" parameter whose value references another entity (e.g. Equipment,\n a Consumable, or a Template). The setpoint value is that entity's ID rather\n than a plain scalar.",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "The definition of a single experimental condition or input variable.\n\nA Parameter (ID format ``PRM...``) names an \"indirect variable\" such as\nTemperature, Spin Speed, or Instrument. The Parameter itself only defines the\nvariable; its actual value and unit are fixed to a setpoint later, inside a\n[`Workflow`][albert.resources.workflows.Workflow]. Parameters are the building\nblocks of Parameter Groups\n([`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup]) and form the\nparameter side of Data Templates\n([`DataTemplate`][albert.resources.data_templates.DataTemplate]).\n\nManage parameters through\n[`ParameterCollection`][albert.collections.parameters.ParameterCollection]\n(``client.parameters``).\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.parameters import Parameter\n client = Albert()\n param = client.parameters.create(parameter=Parameter(name=\"Temperature\"))\n param.id\n # 'PRM9999999'\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the parameter. Names must be unique.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the parameter (format ``PRM...``). Set when the parameter is retrieved from or created in Albert.",
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional user-defined metadata keyed by field name.",
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the parameter is ``Normal`` (scalar value) or ``Special`` (entity reference). Set by the platform and read-only."
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The rank of the returned parameter. Read-only.",
"title": "Rank"
},
"required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this parameter must be filled in within a Parameter Group.",
"title": "Required"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
name(str) -
id(str | None) -
metadata(dict[str, MetadataItem] | None) -
category(ParameterCategory | None) -
rank(int | None) -
required(bool | None)
id
id: str | None = None
The Albert ID of the parameter (format PRM...). Set when the parameter is retrieved from or created in Albert.
metadata
Optional user-defined metadata keyed by field name.
category
category: ParameterCategory | None = None
Whether the parameter is Normal (scalar value) or Special (entity reference). Set by the platform and read-only.
required
required: bool | None = None
Whether this parameter must be filled in within a Parameter Group.