Skip to content

Parameters

albert.resources.parameters

SpecialParameterType

Bases: str, Enum

The specific entity type referenced by a Special Parameter.

Not returned by the platform parameter API (use Zeus reports RET48/RET52 to read the subtype from experiment data). Writable on ParameterValue and TargetParameter.

Each member implies an id-namespace for the value column in experiment reports (RET48/RET52): RAW_MATERIALS values carry INVA... ids, CONSUMABLES carry INVB... ids, EQUIPMENT carry INVC... ids, and FORMULAS carry INVMO... ids.

Mirrors InventoryCategory, the canonical "kind of material" an InventoryItem belongs to. A Special parameter's value is always a reference to an InventoryItem, so its subtype is one of that enum's members.

Attributes:

Name Type Description
RAW_MATERIALS str

A raw material entity. Values appear as INVA... ids in report columns.

CONSUMABLES str

A consumable entity. Values appear as INVB... ids in report columns.

EQUIPMENT str

An equipment entity. Values appear as INVC... ids in report columns.

FORMULAS str

A formula entity (a mixture designed through a Worksheet). Values appear as INVMO... ids in report columns.

RAW_MATERIALS

RAW_MATERIALS = 'RawMaterials'

CONSUMABLES

CONSUMABLES = 'Consumables'

EQUIPMENT

EQUIPMENT = 'Equipment'

FORMULAS

FORMULAS = 'Formulas'

ParameterCategory

Bases: str, Enum

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.

NORMAL

NORMAL = 'Normal'

SPECIAL

SPECIAL = 'Special'

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

from albert import Albert
from albert.resources.parameters import Parameter
client = Albert()
param = client.parameters.create(parameter=Parameter(name="Temperature"))
param.id
# 'PRM9999999'
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": "null"
              }
            ]
          },
          "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:

name

name: str

The name of the parameter. Names must be unique.

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

metadata: dict[str, MetadataItem] | None = None

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.

rank

rank: int | None = None

The rank of the returned parameter. Read-only.

required

required: bool | None = None

Whether this parameter must be filled in within a Parameter Group.

Bases: BaseAlbertModel

A lightweight data template or parameter group reference in a parameter search result.

Show JSON schema:
{
  "$defs": {
    "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": "A lightweight data template or parameter group reference in a parameter search result.",
  "properties": {
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The Albert ID of the linked resource.",
      "title": "Id"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The display name of the linked resource.",
      "title": "Name"
    },
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/Status"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The lifecycle status of the linked resource."
    }
  },
  "title": "ParameterSearchItemLink",
  "type": "object"
}

Fields:

id

id: str | None = None

The Albert ID of the linked resource.

name

name: str | None = None

The display name of the linked resource.

status

status: Status | None = None

The lifecycle status of the linked resource.

ParameterSearchItem

Bases: BaseAlbertModel, HydrationMixin[Parameter]

A lightweight, partially populated parameter from search results.

Returned by search. When id is present, call hydrate() to fetch the fully populated Parameter. Results without an id cannot be hydrated.

Show JSON schema:
{
  "$defs": {
    "ParameterSearchItemLink": {
      "description": "A lightweight data template or parameter group reference in a parameter search result.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The Albert ID of the linked resource.",
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display name of the linked resource.",
          "title": "Name"
        },
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/Status"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The lifecycle status of the linked resource."
        }
      },
      "title": "ParameterSearchItemLink",
      "type": "object"
    },
    "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"
    }
  },
  "additionalProperties": true,
  "description": "A lightweight, partially populated parameter from search results.\n\nReturned by\n[`search`][albert.collections.parameters.ParameterCollection.search]. When ``id`` is present,\ncall ``hydrate()`` to fetch the fully populated\n[`Parameter`][albert.resources.parameters.Parameter]. Results without an ``id`` cannot be hydrated.",
  "properties": {
    "albertId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The Albert ID of the parameter (format ``PRM...``). ``None`` when omitted from the result.",
      "title": "Albertid"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The name of the parameter.",
      "title": "Name"
    },
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/Status"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The lifecycle status of the parameter."
    },
    "createdBy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The ID of the user who created the parameter.",
      "title": "Createdby"
    },
    "createdByName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The display name of the user who created the parameter.",
      "title": "Createdbyname"
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "ISO 8601 timestamp of when the parameter was created.",
      "title": "Createdat"
    },
    "updatedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "ISO 8601 timestamp of when the parameter was last updated.",
      "title": "Updatedat"
    },
    "Metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Custom metadata attached to the parameter.",
      "title": "Metadata"
    },
    "parameterGroups": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ParameterSearchItemLink"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Parameter groups linked to the parameter.",
      "title": "Parametergroups"
    },
    "dataTemplates": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ParameterSearchItemLink"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Data templates linked to the parameter.",
      "title": "Datatemplates"
    }
  },
  "title": "ParameterSearchItem",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

id

id: ParameterId | None = None

The Albert ID of the parameter (format PRM...). None when omitted from the result.

name

name: str | None = None

The name of the parameter.

status

status: Status | None = None

The lifecycle status of the parameter.

created_by

created_by: str | None = None

The ID of the user who created the parameter.

created_by_name

created_by_name: str | None = None

The display name of the user who created the parameter.

created_at

created_at: str | None = None

ISO 8601 timestamp of when the parameter was created.

updated_at

updated_at: str | None = None

ISO 8601 timestamp of when the parameter was last updated.

metadata

metadata: dict[str, Any] | None = None

Custom metadata attached to the parameter.

parameter_groups

parameter_groups: list[ParameterSearchItemLink] | None = (
    None
)

Parameter groups linked to the parameter.

data_templates

data_templates: list[ParameterSearchItemLink] | None = None

Data templates linked to the parameter.