Sheets
albert.resources.sheets
Attributes:
| Name | Type | Description |
|---|---|---|
CellAttributeValue |
|
CellChangeId
CellChangePayload
Bases: TypedDict
Internal payload describing the patch operations to apply to a single cell.
Attributes:
| Name | Type | Description |
|---|---|---|
Id |
CellChangeId
|
|
data |
list[PatchDatum]
|
|
CellColor
A background color that can be applied to Sheet cells.
Each value is the RGB string the platform stores for the cell background.
Used with recolor_cells and recolor_cells to
highlight cells in a Sheet.
Example
Attributes:
| Name | Type | Description |
|---|---|---|
WHITE |
|
|
RED |
|
|
GREEN |
|
|
BLUE |
|
|
YELLOW |
|
|
ORANGE |
|
|
PURPLE |
|
CellType
The kind of content a Cell, Column, or Row holds.
Cells, Columns, and Rows all carry a type drawn from this enum, which
determines how the platform interprets their contents. The values most
relevant when building formulations are INVENTORY (an ingredient amount),
TOTAL (a computed total row), FORMULA and FOR (formulation
columns), LKP (a lookup that displays an inventory attribute), and
BLANK (an empty cell). The remaining members correspond to specialized
grid content such as tags, prices, tasks, results, and apps.
Attributes:
| Name | Type | Description |
|---|---|---|
INVENTORY |
|
|
APP |
|
|
BLANK |
|
|
FORMULA |
|
|
TAG |
|
|
PRICE |
|
|
PDC |
|
|
BAT |
|
|
TOTAL |
|
|
TAS |
|
|
DEF |
|
|
LKP |
|
|
FOR |
|
|
EXTINV |
|
|
BTI |
|
|
PRM |
|
|
PRG |
|
|
RSL |
|
|
FNC |
|
|
WFL |
|
|
DAC |
|
|
INT |
|
|
DAT |
|
|
NDR |
|
|
PIC |
|
DesignType
The section of a Sheet that a Design represents.
A Sheet is organized into stacked sections, each backed by a Design
(Design). The type identifies which section:
PRODUCTS: Product Design, where formulations are built.PROCESS: Process Design.RESULTS: Results, holding Property Tasks and their data.APPS: Apps, holding insights, reporting, and notes.
Attributes:
| Name | Type | Description |
|---|---|---|
APPS |
|
|
PRODUCTS |
|
|
RESULTS |
|
|
PROCESS |
|
|
REAGENTS |
|
ColumnPosition
RowPosition
Where to insert a new row relative to a reference row.
Used by the row-adding methods of Sheet (e.g. add_lookup_row,
add_app_row) to place a new row ABOVE or BELOW an existing one.
Attributes:
| Name | Type | Description |
|---|---|---|
ABOVE |
|
|
BELOW |
|
Cell
Bases: BaseResource
A single cell in a Sheet grid, at the intersection of a Column and a Row.
A Cell is a live grid element: it carries the session and knows its position
(via column_id, row_id, and design_id) as well as its value,
calculation, and formatting. Cells are typically read from a Sheet's grid or
from cells / cells, and written back with
update_cells.
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"
},
"CellType": {
"description": "The kind of content a Cell, Column, or Row holds.\n\nCells, Columns, and Rows all carry a type drawn from this enum, which\ndetermines how the platform interprets their contents. The values most\nrelevant when building formulations are ``INVENTORY`` (an ingredient amount),\n``TOTAL`` (a computed total row), ``FORMULA`` and ``FOR`` (formulation\ncolumns), ``LKP`` (a lookup that displays an inventory attribute), and\n``BLANK`` (an empty cell). The remaining members correspond to specialized\ngrid content such as tags, prices, tasks, results, and apps.",
"enum": [
"INV",
"APP",
"BLK",
"Formula",
"TAG",
"PRC",
"PDC",
"BAT",
"TOT",
"TAS",
"DEF",
"LKP",
"FOR",
"EXTINV",
"BTI",
"PRM",
"PRG",
"RSL",
"FNC",
"WFL",
"DAC",
"INT",
"DAT",
"NDR",
"PIC"
],
"title": "CellType",
"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": "A single cell in a Sheet grid, at the intersection of a Column and a Row.\n\nA Cell is a live grid element: it carries the session and knows its position\n(via ``column_id``, ``row_id``, and ``design_id``) as well as its value,\ncalculation, and formatting. Cells are typically read from a Sheet's grid or\nfrom [`cells`][albert.resources.sheets.Column.cells] / [`cells`][albert.resources.sheets.Row.cells], and written back with\n[`update_cells`][albert.resources.sheets.Sheet.update_cells].",
"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."
},
"colId": {
"description": "The ID of the Column this cell belongs to.",
"title": "Colid",
"type": "string"
},
"rowId": {
"description": "The ID of the Row this cell belongs to.",
"title": "Rowid",
"type": "string"
},
"lableName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the row this cell is in.",
"title": "Lablename"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"items": {},
"type": "array"
}
],
"default": "",
"description": "The value of the cell. For an inventory cell this may be a dict rather than a plain string; see [`raw_value`][albert.resources.sheets.Cell.raw_value] for the underlying value.\n\nFor **special parameters** in the Process Design grid (parameters whose value\nreferences an inventory item: equipment, consumables, raw materials), the\nlinked-cell form is the lookup string ``\"<DisplayID> || <ItemName>\"`` (double\npipe with spaces, INV prefix stripped), e.g. ``\"B90948 || Copper Coupon\"``.\nWriting a bare ``\"INV...\"`` id is accepted by the API but stored as unlinked\nplain text, so the UI shows the raw id instead of the linked item. On reads,\na linked cell's value is a dict of the form ``{\"id\": \"INVB90948\", \"name\":\n\"B90948 || Copper Coupon\"}``.",
"title": "Value"
},
"minValue": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum allowed value for inventory cells. Optional.",
"title": "Minvalue"
},
"maxValue": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The maximum allowed value for inventory cells. Optional.",
"title": "Maxvalue"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/CellType"
},
{
"type": "string"
}
],
"description": "The type of the cell. Allowed values are the same as for [`CellType`][albert.resources.sheets.CellType].",
"title": "Type"
},
"row_type": {
"anyOf": [
{
"$ref": "#/$defs/CellType"
},
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The type of the row containing this cell. Usually one of ``INV`` (inventory row), ``TOT`` (total row), ``TAS`` (task row), ``TAG``, ``PRC``, ``PDC``, ``BAT``, or ``BLK``.",
"title": "Row Type"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the cell. Optional. Default is None.",
"title": "Name"
},
"calculation": {
"default": "",
"description": "The formula backing the cell, if any (e.g. a total). Default is ``\"\"``.",
"title": "Calculation",
"type": "string"
},
"design_id": {
"description": "The ID of the Design (Sheet section) this cell is in.",
"title": "Design Id",
"type": "string"
},
"cellFormat": {
"additionalProperties": true,
"description": "The cell formatting. Default is ``{}``. Keys are ``bgColor`` and ``fontColor``, with RGB string values such as ``\"RGB(255, 255, 255)\"``.",
"title": "Cellformat",
"type": "object"
},
"inventory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inventory Id"
}
},
"required": [
"colId",
"rowId",
"type",
"design_id"
],
"title": "Cell",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
column_id(str) -
row_id(str) -
row_label_name(str | None) -
value(str | dict | list) -
min_value(str | None) -
max_value(str | None) -
type(CellType | str) -
row_type(CellType | str | None) -
name(str | None) -
calculation(str) -
design_id(str) -
format(dict) -
inventory_id(str | None)
value
The value of the cell. For an inventory cell this may be a dict rather than a plain string; see raw_value for the underlying value.
For special parameters in the Process Design grid (parameters whose value
references an inventory item: equipment, consumables, raw materials), the
linked-cell form is the lookup string "<DisplayID> || <ItemName>" (double
pipe with spaces, INV prefix stripped), e.g. "B90948 || Copper Coupon".
Writing a bare "INV..." id is accepted by the API but stored as unlinked
plain text, so the UI shows the raw id instead of the linked item. On reads,
a linked cell's value is a dict of the form {"id": "INVB90948", "name":
"B90948 || Copper Coupon"}.
row_type
The type of the row containing this cell. Usually one of INV (inventory row), TOT (total row), TAS (task row), TAG, PRC, PDC, BAT, or BLK.
calculation
calculation: str = ''
The formula backing the cell, if any (e.g. a total). Default is "".
format
format: dict
The cell formatting. Default is {}. Keys are bgColor and fontColor, with RGB string values such as "RGB(255, 255, 255)".
Component
Bases: BaseResource
One ingredient and its amount within a formulation.
A Component pairs an inventory item (InventoryItem)
with the amount of it used in a formulation. Components are the input to
add_formulation and add_components_to_formulation,
which place each ingredient's amount into the appropriate Cell of a
formulation Column. Provide either inventory_item or inventory_id;
when inventory_item is given, inventory_id is populated from it
automatically.
Example
Show JSON schema:
{
"$defs": {
"ACL": {
"description": "A single access rule for a user.",
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
}
},
"required": [
"id"
],
"title": "ACL",
"type": "object"
},
"AccessControlLevel": {
"description": "Access control levels you can grant users.",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectStrictViewer",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer",
"CASFullAccess"
],
"title": "AccessControlLevel",
"type": "string"
},
"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"
},
"Cas": {
"description": "A CAS entry: a chemical substance identified by its CAS Registry Number.\n\nA ``Cas`` is Albert's dictionary record for a substance. Raw-material Inventory\nItems reference these entries to declare what they are made of, pairing each\n``Cas`` with an amount (see [`CasAmount`][albert.resources.inventory.CasAmount]).\nManage entries through\n[`CasCollection`][albert.collections.cas.CasCollection] (``client.cas``): most fields\nare populated by Albert, so you typically only build a ``Cas`` from a registry\n``number`` when creating a new entry.\n\n!!! example\n ```python\n from albert.resources.cas import Cas\n # Build a CAS entry to register a new substance\n cas = Cas(number=\"7727-37-9\")\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."
},
"number": {
"description": "The CAS number.",
"title": "Number",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the CAS.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The description or name of the CAS.",
"title": "Description"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Notes related to the CAS.",
"title": "Notes"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/CasCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the CAS."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS SMILES notation.",
"title": "Cassmiles"
},
"inchiKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "InChIKey of the CAS.",
"title": "Inchikey"
},
"iUpacName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "IUPAC name of the CAS.",
"title": "Iupacname"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The AlbertID of the CAS.",
"title": "Albertid"
},
"hazards": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Hazard"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazards associated with the CAS.",
"title": "Hazards"
},
"wgk": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "German Water Hazard Class (WGK) number.",
"title": "Wgk"
},
"ecListNo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "European Community (EC) number.",
"title": "Eclistno"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Internal classification_type reference.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Classification type of the CAS.",
"title": "Classificationtype"
},
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS order.",
"title": "Order"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"description": "Custom metadata keyed by field. Updatable.",
"title": "Metadata",
"type": "object"
}
},
"required": [
"number"
],
"title": "Cas",
"type": "object"
},
"CasAmount": {
"description": "A single CAS constituent and its concentration within an [`InventoryItem`][albert.resources.inventory.InventoryItem].\n\nA ``CasAmount`` links one CAS number (a chemical substance identifier) to the\namount of that substance present in an inventory item, expressed as a range\n(``min`` to ``max``) with an optional ``target``. A list of these on an\n[`InventoryItem`][albert.resources.inventory.InventoryItem] gives the item's compositional breakdown.\n\nIdentify the CAS in one of two ways: pass a full [`Cas`][albert.resources.cas.Cas]\nobject as ``cas`` (its ``id``, ``number``, and ``cas_smiles`` are then copied onto\nthis amount), or pass just the CAS resource ``id`` string. Do not pass both.\n\n!!! example\n ```python\n from albert.resources.inventory import CasAmount\n\n # Reference an existing CAS resource by its Albert ID, 10-30% concentration\n amount = CasAmount(min=10.0, max=30.0, id=\"CAS1\")\n ```",
"properties": {
"min": {
"description": "The minimum amount (concentration) of the CAS in the item.",
"title": "Min",
"type": "number"
},
"max": {
"description": "The maximum amount (concentration) of the CAS in the item.",
"title": "Max",
"type": "number"
},
"inventoryValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target amount of the CAS in the item. Serialized as ``inventoryValue``.",
"title": "Inventoryvalue"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the CAS resource this amount represents. Provide either a ``cas`` object or an ``id``; when ``cas`` is given, this is set from it.",
"title": "Id"
},
"casCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the CAS is a trade secret.",
"title": "Cascategory"
},
"inventoryFunction": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/ListItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "string"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Business-controlled functions associated with the CAS in this inventory context (e.g. what role the substance plays). Values come from a managed list.",
"title": "Inventoryfunction"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS type. Can be retrieved from the CAS collection before construction.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The EU classification source for the CAS: harmonized, notified, or REACH.",
"title": "Classificationtype"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The substance ID linked to this CAS entry.",
"title": "Substanceid"
},
"cas": {
"anyOf": [
{
"$ref": "#/$defs/Cas"
},
{
"type": "null"
}
],
"default": null,
"description": "The full CAS object associated with this amount. Read-only after init; excluded from serialization. Provide either a ``cas`` or an ``id``."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string of the CAS resource. Read-only; set from the ``cas`` object.",
"title": "Cassmiles"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS number (e.g. ``\"7440-32-6\"``). Read-only; set from the ``cas`` object.",
"title": "Number"
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit metadata for creation. Read-only."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/CasAuditFieldsWithEmail"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit metadata for the last update. Read-only. See Also --------"
}
},
"required": [
"min",
"max"
],
"title": "CasAmount",
"type": "object"
},
"CasAuditFieldsWithEmail": {
"description": "The audit fields for a CAS resource with email",
"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"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
}
},
"title": "CasAuditFieldsWithEmail",
"type": "object"
},
"CasCategory": {
"enum": [
"User",
"Verisk",
"TSCA - Public",
"TSCA - Private",
"not TSCA",
"CAS linked to External Database",
"Unknown (Trade Secret)",
"CL_Inventory Upload"
],
"title": "CasCategory",
"type": "string"
},
"Company": {
"description": "A manufacturing company or supplier tracked in Albert.\n\nA Company is the organization that makes or supplies a material. It is the\n``company`` linked on raw-material inventory items: each raw material points\nback to the Company that manufactures it (see\n[`InventoryItem`][albert.resources.inventory.InventoryItem]). Companies are managed\nthrough [`CompanyCollection`][albert.collections.companies.CompanyCollection], accessed as\n``client.companies``.\n\nCompanies are identified by a Company ID (format ``COM...``). A Company is\ntypically minimal: a name plus its assigned ID. You construct one directly\n(``Company(name=\"Acme Chemicals\")``) to create it or to attach it to an\ninventory item.\n\n!!! example\n ```python\n from albert.resources.companies import Company\n\n # Build a company to create or attach to an inventory item\n company = Company(name=\"Acme Chemicals\")\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 company's name. This is the primary identifier used when searching for or creating a company.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Company ID (format ``COM...``). ``None`` until the company is created in or retrieved from Albert.",
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Search-relevance score returned when the company comes back as a search result. Read-only; not set on companies you build yourself.",
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"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"
},
"Hazard": {
"description": "A single GHS hazard classification associated with a CAS substance.\n\nHazards are read from the CAS record; a [`Cas`][albert.resources.cas.Cas] may carry a list of them.",
"properties": {
"subCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard subcategory",
"title": "Subcategory"
},
"hCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code",
"title": "Hcode"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard category",
"title": "Category"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard classification",
"title": "Class"
},
"hCodeText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code text",
"title": "Hcodetext"
}
},
"title": "Hazard",
"type": "object"
},
"InventoryCategory": {
"description": "The kind of material an [`InventoryItem`][albert.resources.inventory.InventoryItem] represents.\n\nEvery inventory item belongs to exactly one category, which determines how it\nis used across the platform and which fields are relevant to it.\n\nAttributes\n----------\nRAW_MATERIALS : str\n A purchased substance used as an ingredient (e.g. a solvent or pigment).\n Typically linked to a manufacturing ``company`` and one or more CAS numbers.\nCONSUMABLES : str\n Lab supplies consumed during work (e.g. gloves, vials, filters).\nEQUIPMENT : str\n Instruments and apparatus (e.g. a balance or spectrometer).\nFORMULAS : str\n A mixture designed in Albert through a Worksheet. Formulas are not created\n through the inventory collection; they are produced by the Worksheet\n collection ([`WorksheetCollection`][albert.collections.worksheets.WorksheetCollection]).",
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
},
"InventoryItem": {
"description": "A catalog entry for a material tracked in Albert.\n\nAn ``InventoryItem`` is the canonical record for a raw material, consumable,\npiece of equipment, or formula. Its [`InventoryCategory`][albert.resources.inventory.InventoryCategory] determines how it\nis used across the platform, and once saved it is referenced everywhere by its\nInventory ID (format ``INV...``, e.g. ``\"INVA9999999\"``). Raw materials are typically\nlinked to a manufacturing ``company`` and a compositional breakdown of CAS\namounts. Formula items are designed in Worksheets rather than created here (the\n[`create`][albert.collections.inventory.InventoryCollection.create] method rejects\nFormula items), and a Formula requires a ``project_id``.\n\nItems are managed through\n[`InventoryCollection`][albert.collections.inventory.InventoryCollection] (``client.inventory``).\n\n!!! example\n ```python\n from albert.resources.inventory import InventoryItem, InventoryCategory\n\n item = InventoryItem(\n name=\"Titanium Dioxide\",\n category=InventoryCategory.RAW_MATERIALS,\n company=\"Acme Chemicals\",\n )\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."
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of Tag objects or strings representing tags.",
"title": "Tags"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the item.",
"title": "Name"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Inventory ID (format ``INV...``). Set when the item is retrieved from or created in Albert. Serialized as ``albertId``.",
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A free-text description of the item.",
"title": "Description"
},
"category": {
"$ref": "#/$defs/InventoryCategory",
"description": "The kind of material this item represents. Required. One of ``RawMaterials``, ``Consumables``, ``Equipment``, or ``Formulas``."
},
"unitCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryUnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The dimension the item is measured in (mass, volume, length, pressure, or units). If not supplied, it defaults from ``category``: mass for raw materials and formulas, units for equipment and consumables."
},
"class": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null,
"description": "The access/security class of the item (e.g. confidential, shared, restricted)."
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The manufacturing Company associated with the item (links to the Company collection). Accepts a [`Company`][albert.resources.companies.Company] or a name string; a string is turned into a Company that is first-or-created on save.",
"title": "Company"
},
"minimum": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/InventoryMinimum"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Per-Location reorder thresholds for the item. See [`InventoryMinimum`][albert.resources.inventory.InventoryMinimum].",
"title": "Minimum"
},
"alias": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "An alternate name for the item.",
"title": "Alias"
},
"Cas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasAmount"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The item's compositional breakdown as CAS amounts. See [`CasAmount`][albert.resources.inventory.CasAmount].",
"title": "Cas"
},
"isFormulaOverride": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the substance/CAS-level breakdown for this formula has been overridden from the auto-calculated value; commonly set to indicate the formula is not a non-reactive homogeneous mixture.",
"title": "Isformulaoverride"
},
"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": "Custom metadata fields. Allowed keys are defined by the workspace's CustomFields configuration.",
"title": "Metadata"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parent Project ID. Required for Formulas. Serialized as ``parentId``.",
"title": "Parentid"
},
"ACL": {
"description": "Access-control entries governing who can act on the item.",
"items": {
"$ref": "#/$defs/ACL"
},
"title": "Acl",
"type": "array"
},
"onHand": {
"default": 0.0,
"description": "Total amount currently on hand across all lots. Read-only.",
"title": "Onhand",
"type": "number"
},
"TaskConfig": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Task configuration associated with the item. Read-only.",
"title": "Taskconfig"
},
"formulaId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The formula ID for a formula item. Read-only.",
"title": "Formulaid"
},
"Symbols": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard/pictogram symbols associated with the item. Read-only.",
"title": "Symbols"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The UN hazardous-material number, when applicable. Read-only.",
"title": "Unnumber"
},
"recentAttachmentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the most recent attachment on the item. Read-only. See Also --------",
"title": "Recentattachmentid"
}
},
"required": [
"category"
],
"title": "InventoryItem",
"type": "object"
},
"InventoryMinimum": {
"description": "A reorder threshold: the minimum stock of an [`InventoryItem`][albert.resources.inventory.InventoryItem] to keep at a Location.\n\nEach entry pairs one Location with the minimum quantity of an item that must be\nkept on hand there. An [`InventoryItem`][albert.resources.inventory.InventoryItem] may carry several of these, one per\nLocation. Identify the Location either by passing a full\n[`Location`][albert.resources.locations.Location] object as ``location`` (its ``id`` is\nthen copied onto ``id``), or by passing the location ``id`` string directly. Provide\none or the other, not both.\n\n!!! example\n ```python\n from albert.resources.inventory import InventoryMinimum\n\n minimum = InventoryMinimum(id=\"LOC9999999\", minimum=500)\n ```",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the Location this minimum applies to. Provide either a ``location`` or an ``id``; when ``location`` is given, this is set from it.",
"title": "Id"
},
"location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"type": "null"
}
],
"default": null,
"description": "The Location object this minimum applies to. Excluded from serialization. Provide either a ``location`` or an ``id``."
},
"minimum": {
"description": "The minimum amount of the item that must be kept in stock at the Location. Must be between 0 and 1e15. See Also --------",
"maximum": 1000000000000000,
"minimum": 0,
"title": "Minimum",
"type": "number"
}
},
"required": [
"minimum"
],
"title": "InventoryMinimum",
"type": "object"
},
"InventoryUnitCategory": {
"description": "The dimension of the unit an [`InventoryItem`][albert.resources.inventory.InventoryItem] is measured and stocked in.\n\nDetermines how quantities on hand and in formulas are interpreted. When not\nsupplied, the category defaults based on [`InventoryCategory`][albert.resources.inventory.InventoryCategory]: ``MASS``\nfor raw materials and formulas, ``UNITS`` for equipment and consumables.\n\nAttributes\n----------\nMASS : str\n Measured by mass (e.g. grams, kilograms).\nVOLUME : str\n Measured by volume (e.g. milliliters, liters).\nLENGTH : str\n Measured by length (e.g. meters).\nPRESSURE : str\n Measured by pressure.\nUNITS : str\n Counted as discrete units (e.g. each item).",
"enum": [
"mass",
"volume",
"length",
"pressure",
"units"
],
"title": "InventoryUnitCategory",
"type": "string"
},
"ListItem": {
"description": "A single allowed value in a configurable list of options.\n\nList items back the choices offered by ``list``-type custom fields (e.g.\ndropdown options) and other fixed option sets in Albert. A\n[`CustomField`][albert.resources.custom_fields.CustomField] with\n[`LIST`][albert.resources.custom_fields.FieldType.LIST] defines a list (keyed\nby ``list_type``, typically the field's name); its selectable options are\n``ListItem`` records with a matching ``list_type``. Managed through\n[`ListsCollection`][albert.collections.lists.ListsCollection] (``client.lists``).\n\n!!! example\n ```python\n from albert.resources.lists import ListItem, ListItemCategory\n item = ListItem(name=\"In Progress\", category=ListItemCategory.USER_DEFINED)\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 display name of the list item (the option value).",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the list item. Set when the item is retrieved from or created in Albert.",
"title": "Albertid"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ListItemCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the list item. Allowed values are ``businessDefined``, ``userDefined``, ``projects``, ``extensions``, and ``inventory``."
},
"listType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The list this item belongs to. For a list-type custom field this is typically the field's name (see [`CustomField`][albert.resources.custom_fields.CustomField]). For built-in categories the allowed values are ``projectState`` for ``projects``, ``extensions`` for ``extensions``, and ``casCategory`` or ``inventoryFunction`` for ``inventory``.",
"title": "Listtype"
}
},
"required": [
"name"
],
"title": "ListItem",
"type": "object"
},
"ListItemCategory": {
"description": "The category a list item belongs to, which governs its allowed list types.\n\nAttributes\n----------\nBUSINESS_DEFINED : str\n Predefined values managed at the business/organization level.\nUSER_DEFINED : str\n Custom values defined by users.\nPROJECTS : str\n Values used by projects (e.g. project states).\nEXTENSIONS : str\n Values used by extensions.\nINVENTORY : str\n Values used by inventory (e.g. CAS categories or inventory functions).",
"enum": [
"businessDefined",
"userDefined",
"projects",
"extensions",
"inventory"
],
"title": "ListItemCategory",
"type": "string"
},
"Location": {
"description": "A physical lab or site location in Albert.\n\nLocations are referenced by Tasks and Inventory Items to record where an\nactivity is performed or where a material lives, and each Location can hold\none or more Storage Locations\n([`StorageLocation`][albert.resources.storage_locations.StorageLocation]). Managed\nthrough [`LocationCollection`][albert.collections.locations.LocationCollection].\n\n!!! example\n ```python\n from albert.resources.locations import Location\n location = Location(\n name=\"Boston Lab\",\n latitude=42.3601,\n longitude=-71.0589,\n address=\"1 Main St\",\n country=\"US\",\n )\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 human-readable name of the location.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the location. Assigned by Albert and populated once the location has been created or retrieved.",
"title": "Albertid"
},
"latitude": {
"description": "The latitude of the location, in decimal degrees.",
"title": "Latitude",
"type": "number"
},
"longitude": {
"description": "The longitude of the location, in decimal degrees.",
"title": "Longitude",
"type": "number"
},
"address": {
"description": "The street address of the location.",
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The two-letter country code of the location (for example, ``\"US\"``).",
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"SecurityClass": {
"description": "The security (access control) class of a resource.\n\nAttributes\n----------\nSHARED : str\n Accessible to all members of the tenant.\nRESTRICTED : str\n Access is restricted to specific teams or users.\nCONFIDENTIAL : str\n Access is limited to designated users only.\nPRIVATE : str\n Visible only to the owner. Used by Projects.",
"enum": [
"shared",
"restricted",
"confidential",
"private"
],
"title": "SecurityClass",
"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"
},
"Tag": {
"description": "A freeform text label used to categorize and connect entities.\n\nTags are shared by name across the platform and can be applied to inventory\nitems, companies, tasks, and other records to group and filter them. Managed\nthrough [`TagCollection`][albert.collections.tags.TagCollection] (``client.tags``);\nthe usual entry point is [`get_or_create`][albert.collections.tags.TagCollection.get_or_create].\n\n!!! example\n ```python\n from albert.resources.tags import Tag\n tag = Tag(tag=\"high-priority\")\n ```\nMethods\n-------\nfrom_string(tag) -> Tag\n Build a Tag from its name string.",
"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 tag (its text label).",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the tag (format ``TAG...``). Set when the tag is retrieved from or created in Albert. Methods ------- from_string(tag) -> Tag Build a Tag from its name string.",
"title": "Albertid"
}
},
"required": [
"name"
],
"title": "Tag",
"type": "object"
}
},
"description": "One ingredient and its amount within a formulation.\n\nA Component pairs an inventory item ([`InventoryItem`][albert.resources.inventory.InventoryItem])\nwith the amount of it used in a formulation. Components are the input to\n[`add_formulation`][albert.resources.sheets.Sheet.add_formulation] and [`add_components_to_formulation`][albert.resources.sheets.Sheet.add_components_to_formulation],\nwhich place each ingredient's amount into the appropriate Cell of a\nformulation Column. Provide either ``inventory_item`` or ``inventory_id``;\nwhen ``inventory_item`` is given, ``inventory_id`` is populated from it\nautomatically.\n\n!!! example\n ```python\n from albert.resources.sheets import Component\n component = Component(inventory_id=\"INVA9999999\", amount=42.0)\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."
},
"inventory_item": {
"anyOf": [
{
"$ref": "#/$defs/InventoryItem"
},
{
"type": "null"
}
],
"default": null,
"description": "The inventory item in the component. Optional when ``inventory_id`` is provided."
},
"inventory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The inventory ID backing the component (format ``INV...``). Automatically populated from ``inventory_item`` when present; required when ``inventory_item`` is omitted.",
"title": "Inventory Id"
},
"amount": {
"description": "The amount of the inventory item in the formulation.",
"title": "Amount",
"type": "number"
},
"min_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum allowed amount for the component. Optional.",
"title": "Min Value"
},
"max_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The maximum allowed amount for the component. Optional.",
"title": "Max Value"
}
},
"required": [
"amount"
],
"title": "Component",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
inventory_item(InventoryItem | None) -
inventory_id(InventoryId | None) -
amount(float) -
min_value(float | None) -
max_value(float | None) -
_cell(Cell)
Validators:
-
_ensure_inventory_reference
inventory_item
inventory_item: InventoryItem | None = None
The inventory item in the component. Optional when inventory_id is provided.
inventory_id
inventory_id: InventoryId | None = None
The inventory ID backing the component (format INV...). Automatically populated from inventory_item when present; required when inventory_item is omitted.
DesignState
Bases: BaseResource
The display state of a Design section within a Sheet.
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"
},
"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 display state of a Design section within a Sheet.",
"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."
},
"collapsed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the Design section is collapsed in the Sheet view. Default is False.",
"title": "Collapsed"
}
},
"title": "DesignState",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
collapsed(bool | None)
collapsed
collapsed: bool | None = False
Whether the Design section is collapsed in the Sheet view. Default is False.
RowConfig
Bases: BaseAlbertModel
Configuration for an APP or location-type row.
Show JSON schema:
{
"description": "Configuration for an APP or location-type row.",
"properties": {
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Option"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"title": "RowConfig",
"type": "object"
}
Fields:
RowGroup
Bases: BaseAlbertModel
A named group of rows within a Design.
Show JSON schema:
{
"description": "A named group of rows within a Design.",
"properties": {
"rowId": {
"title": "Rowid",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"child_row_ids": {
"items": {
"type": "string"
},
"title": "Child Row Ids",
"type": "array"
}
},
"required": [
"rowId"
],
"title": "RowGroup",
"type": "object"
}
Fields:
Design
Bases: BaseSessionResource
One section of a Sheet, backing the grid for a single DesignType.
A Sheet is made up of stacked sections (Product Design, Process Design,
Results, and Apps) and each section is a Design. Designs are largely an
internal detail: most work is done through the parent Sheet, which
exposes its Designs as product_design,
result_design, app_design, and
process_design. A Design is a live grid element that carries the
session and lazily loads its rows, columns, and grid on first access.
Methods:
| Name | Description |
|---|---|
group_rows |
Create a named row group within this design. |
get_groups |
Get all row groups in this design. |
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"
},
"DesignState": {
"description": "The display state of a Design section within a Sheet.",
"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."
},
"collapsed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the Design section is collapsed in the Sheet view. Default is False.",
"title": "Collapsed"
}
},
"title": "DesignState",
"type": "object"
},
"DesignType": {
"description": "The section of a Sheet that a Design represents.\n\nA Sheet is organized into stacked sections, each backed by a Design\n([`Design`][albert.resources.sheets.Design]). The type identifies which section:\n\n- ``PRODUCTS``: Product Design, where formulations are built.\n- ``PROCESS``: Process Design.\n- ``RESULTS``: Results, holding Property Tasks and their data.\n- ``APPS``: Apps, holding insights, reporting, and notes.",
"enum": [
"apps",
"products",
"results",
"process",
"reagents"
],
"title": "DesignType",
"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": "One section of a Sheet, backing the grid for a single [`DesignType`][albert.resources.sheets.DesignType].\n\nA Sheet is made up of stacked sections (Product Design, Process Design,\nResults, and Apps) and each section is a Design. Designs are largely an\ninternal detail: most work is done through the parent [`Sheet`][albert.resources.sheets.Sheet], which\nexposes its Designs as [`product_design`][albert.resources.sheets.Sheet.product_design],\n[`result_design`][albert.resources.sheets.Sheet.result_design], [`app_design`][albert.resources.sheets.Sheet.app_design], and\n[`process_design`][albert.resources.sheets.Sheet.process_design]. A Design is a live grid element that carries the\nsession and lazily loads its rows, columns, and grid on first access.\nMethods\n-------\ngroup_rows(name, child_row_ids, ...) -> RowGroup\n Create a named row group within this design.\nget_groups(refresh=False) -> list[RowGroup]\n Get all row groups in this design.",
"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."
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignState"
},
{
"type": "null"
}
],
"default": null,
"description": "The display state of the design. Optional. Default is None."
},
"albertId": {
"description": "The Albert ID of the design.",
"title": "Albertid",
"type": "string"
},
"designType": {
"anyOf": [
{
"$ref": "#/$defs/DesignType"
},
{
"type": "string"
}
],
"description": "The section of the Sheet this design backs. See [`DesignType`][albert.resources.sheets.DesignType]. Unknown legacy/tenant values parse as plain strings.",
"title": "Designtype"
}
},
"required": [
"albertId",
"designType"
],
"title": "Design",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
_session(AlbertSession | None) -
state(DesignState | None) -
id(str) -
design_type(DesignType | str)
Source code in src/albert/core/shared/models/base.py
design_type
design_type: DesignType | str
The section of the Sheet this design backs. See DesignType. Unknown legacy/tenant values parse as plain strings.
group_rows
group_rows(
*,
name: str,
child_row_ids: list[str],
reference_id: str | None = None,
position: str = "above",
) -> RowGroup
Create a row group within this design.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the row group. |
required |
child_row_ids
|
list[str]
|
Row IDs to include in the group. Must contain at least one ID. |
required |
reference_id
|
str
|
The reference row ID for insertion. Defaults to the first child row. |
None
|
position
|
str
|
Position relative to |
'above'
|
Returns:
| Type | Description |
|---|---|
RowGroup
|
The created row group. |
Source code in src/albert/resources/sheets.py
get_groups
Get all row groups in this design.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refresh
|
bool
|
When True, re-fetches the group list even if cached. Default is False. |
False
|
Returns:
| Type | Description |
|---|---|
list[RowGroup]
|
The row groups in this design. |
Source code in src/albert/resources/sheets.py
SheetFormulationRef
Bases: BaseAlbertModel
A reference to a formulation in a sheet
Show JSON schema:
{
"description": "A reference to a formulation in a sheet",
"properties": {
"id": {
"description": "The Albert ID of the inventory item that is the formulation",
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the formulation",
"title": "Name"
},
"hidden": {
"description": "Whether the formulation is hidden",
"title": "Hidden",
"type": "boolean"
}
},
"required": [
"id",
"hidden"
],
"title": "SheetFormulationRef",
"type": "object"
}
Fields:
Sheet
Bases: BaseSessionResource
An interactive grid within a Worksheet where formulations are built.
A Sheet is one grid inside a Worksheet (Worksheet).
It is organized into stacked sections, each a Design: Product Design
(where formulations are built), Process Design, Results (Property Tasks and
their data), and Apps (insights and notes). Access those sections through
product_design, process_design, result_design, and
app_design.
A Sheet Column can be a formulation (the most common case for the SDK), a lookup column that displays an inventory attribute, or an ingredient name. Rows typically represent ingredients (inventory items) and their amounts. Adding a formulation to a Sheet is what registers a Formula inventory item.
The Sheet is a live grid element that carries the session; its cells, columns,
and rows are themselves interactive. Retrieve a Sheet from a Worksheet's
sheets, then edit it in place
with the methods below.
Example
Methods:
| Name | Description |
|---|---|
rename |
Rename the sheet. |
add_formulation |
Build a formulation column from a list of components (registers a Formula). |
add_components_to_formulation |
Add components to an existing formulation column. |
add_formulation_columns |
Add one or more empty formulation columns. |
add_inventory_row |
Add an ingredient (inventory) row. |
add_blank_row |
Add a blank row. |
add_lookup_row |
Add a lookup row. |
add_app_row |
Add an application row. |
add_parameter_group_row |
Add a parameter group (PRG) row to Process Design. |
add_blank_column |
Add a blank column. |
add_lookup_column |
Add a lookup column. |
add_function_column |
Add a function column. |
add_property_column |
Add a property/result column. |
get_column |
Retrieve a column by column ID, inventory ID, or name. |
update_cells |
Write changed cells back to the sheet. |
pin_columns |
Pin columns to the left or right edge. |
unpin_columns |
Unpin columns. |
lock_column |
Lock or unlock a column. |
hide_column |
Hide a column. |
show_column |
Show a hidden column. |
set_columns_width |
Set the display width of columns. |
delete_column |
Delete a column. |
delete_row |
Delete a row. |
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"
},
"Design": {
"description": "One section of a Sheet, backing the grid for a single [`DesignType`][albert.resources.sheets.DesignType].\n\nA Sheet is made up of stacked sections (Product Design, Process Design,\nResults, and Apps) and each section is a Design. Designs are largely an\ninternal detail: most work is done through the parent [`Sheet`][albert.resources.sheets.Sheet], which\nexposes its Designs as [`product_design`][albert.resources.sheets.Sheet.product_design],\n[`result_design`][albert.resources.sheets.Sheet.result_design], [`app_design`][albert.resources.sheets.Sheet.app_design], and\n[`process_design`][albert.resources.sheets.Sheet.process_design]. A Design is a live grid element that carries the\nsession and lazily loads its rows, columns, and grid on first access.\nMethods\n-------\ngroup_rows(name, child_row_ids, ...) -> RowGroup\n Create a named row group within this design.\nget_groups(refresh=False) -> list[RowGroup]\n Get all row groups in this design.",
"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."
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignState"
},
{
"type": "null"
}
],
"default": null,
"description": "The display state of the design. Optional. Default is None."
},
"albertId": {
"description": "The Albert ID of the design.",
"title": "Albertid",
"type": "string"
},
"designType": {
"anyOf": [
{
"$ref": "#/$defs/DesignType"
},
{
"type": "string"
}
],
"description": "The section of the Sheet this design backs. See [`DesignType`][albert.resources.sheets.DesignType]. Unknown legacy/tenant values parse as plain strings.",
"title": "Designtype"
}
},
"required": [
"albertId",
"designType"
],
"title": "Design",
"type": "object"
},
"DesignState": {
"description": "The display state of a Design section within a Sheet.",
"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."
},
"collapsed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the Design section is collapsed in the Sheet view. Default is False.",
"title": "Collapsed"
}
},
"title": "DesignState",
"type": "object"
},
"DesignType": {
"description": "The section of a Sheet that a Design represents.\n\nA Sheet is organized into stacked sections, each backed by a Design\n([`Design`][albert.resources.sheets.Design]). The type identifies which section:\n\n- ``PRODUCTS``: Product Design, where formulations are built.\n- ``PROCESS``: Process Design.\n- ``RESULTS``: Results, holding Property Tasks and their data.\n- ``APPS``: Apps, holding insights, reporting, and notes.",
"enum": [
"apps",
"products",
"results",
"process",
"reagents"
],
"title": "DesignType",
"type": "string"
},
"SheetFormulationRef": {
"description": "A reference to a formulation in a sheet",
"properties": {
"id": {
"description": "The Albert ID of the inventory item that is the formulation",
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the formulation",
"title": "Name"
},
"hidden": {
"description": "Whether the formulation is hidden",
"title": "Hidden",
"type": "boolean"
}
},
"required": [
"id",
"hidden"
],
"title": "SheetFormulationRef",
"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"
}
},
"description": "An interactive grid within a Worksheet where formulations are built.\n\nA Sheet is one grid inside a Worksheet ([`Worksheet`][albert.resources.worksheets.Worksheet]).\nIt is organized into stacked sections, each a [`Design`][albert.resources.sheets.Design]: Product Design\n(where formulations are built), Process Design, Results (Property Tasks and\ntheir data), and Apps (insights and notes). Access those sections through\n[`product_design`][albert.resources.sheets.Sheet.product_design], [`process_design`][albert.resources.sheets.Sheet.process_design], [`result_design`][albert.resources.sheets.Sheet.result_design], and\n[`app_design`][albert.resources.sheets.Sheet.app_design].\n\nA Sheet Column can be a formulation (the most common case for the SDK), a\nlookup column that displays an inventory attribute, or an ingredient name.\nRows typically represent ingredients (inventory items) and their amounts.\nAdding a formulation to a Sheet is what registers a Formula inventory item.\n\nThe Sheet is a live grid element that carries the session; its cells, columns,\nand rows are themselves interactive. Retrieve a Sheet from a Worksheet's\n[`sheets`][albert.resources.worksheets.Worksheet.sheets], then edit it in place\nwith the methods below.\n\n!!! example\n ```python\n from albert import Albert\n client = Albert()\n worksheet = client.worksheets.get_by_project_id(project_id=\"PROA9999999\")\n sheet = worksheet.sheets[0]\n print(sheet.grid)\n ```\nMethods\n-------\nrename(new_name) -> Sheet\n Rename the sheet.\nadd_formulation(formulation_name, components, ...) -> Column\n Build a formulation column from a list of components (registers a Formula).\nadd_components_to_formulation(components, ...) -> Column\n Add components to an existing formulation column.\nadd_formulation_columns(formulation_names, ...) -> list[Column]\n Add one or more empty formulation columns.\nadd_inventory_row(inventory_id, ...) -> Row\n Add an ingredient (inventory) row.\nadd_blank_row(row_name, ...) -> Row\n Add a blank row.\nadd_lookup_row(name, ...) -> Row\n Add a lookup row.\nadd_app_row(app_id, name, ...) -> Row\n Add an application row.\nadd_parameter_group_row(parameter_group_id, ...) -> Row\n Add a parameter group (PRG) row to Process Design.\nadd_blank_column(name, ...) -> Column\n Add a blank column.\nadd_lookup_column(name, ...) -> Column\n Add a lookup column.\nadd_function_column(name, ...) -> Column\n Add a function column.\nadd_property_column(name, attribute_id, ...) -> Column\n Add a property/result column.\nget_column(...) -> Column\n Retrieve a column by column ID, inventory ID, or name.\nupdate_cells(cells) -> tuple[list[Cell], list[Cell]]\n Write changed cells back to the sheet.\npin_columns(col_ids, side) -> None\n Pin columns to the left or right edge.\nunpin_columns(col_ids) -> None\n Unpin columns.\nlock_column(...) -> Column\n Lock or unlock a column.\nhide_column(col_id) -> None\n Hide a column.\nshow_column(col_id) -> None\n Show a hidden column.\nset_columns_width(col_ids, width) -> None\n Set the display width of columns.\ndelete_column(column_id) -> None\n Delete a column.\ndelete_row(row_id, design_id) -> None\n Delete a row.",
"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."
},
"albertId": {
"description": "The Albert ID of the sheet.",
"title": "Albertid",
"type": "string"
},
"name": {
"description": "The name of the sheet.",
"title": "Name",
"type": "string"
},
"Formulas": {
"description": "References to the formulations present on the sheet.",
"items": {
"$ref": "#/$defs/SheetFormulationRef"
},
"title": "Formulas",
"type": "array"
},
"hidden": {
"description": "Whether the sheet is hidden.",
"title": "Hidden",
"type": "boolean"
},
"isColumnRight": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "When True, copied columns are placed to the right of the source column; when False, to the left.",
"title": "Iscolumnright"
},
"colSizeMode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Column width sizing mode. Allowed values are ``\"minimum\"`` and ``\"fitToColumn\"``. ``None`` resets to the default grid width.",
"title": "Colsizemode"
},
"Designs": {
"description": "The Designs (sections) of the sheet.",
"items": {
"$ref": "#/$defs/Design"
},
"title": "Designs",
"type": "array"
},
"projectId": {
"description": "The ID of the Project the sheet belongs to (format ``PRO...``).",
"title": "Projectid",
"type": "string"
}
},
"required": [
"albertId",
"name",
"hidden",
"Designs",
"projectId"
],
"title": "Sheet",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
_session(AlbertSession | None) -
id(str) -
name(str) -
formulations(list[SheetFormulationRef]) -
hidden(bool) -
is_column_right(bool | None) -
col_size_mode(str | None) -
designs(list[Design]) -
project_id(str)
Validators:
Source code in src/albert/core/shared/models/base.py
formulations
formulations: list[SheetFormulationRef]
References to the formulations present on the sheet.
is_column_right
is_column_right: bool | None = None
When True, copied columns are placed to the right of the source column; when False, to the left.
col_size_mode
col_size_mode: str | None = None
Column width sizing mode. Allowed values are "minimum" and "fitToColumn". None resets to the default grid width.
set_session
set_sheet_fields
set_sheet_fields() -> Sheet
Source code in src/albert/resources/sheets.py
rename
rename(*, new_name: str)
Rename this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_name
|
str
|
The new name for the sheet. |
required |
Returns:
| Type | Description |
|---|---|
Sheet
|
This sheet, with its name updated. |
Source code in src/albert/resources/sheets.py
add_formulation
add_formulation(
*,
formulation_name: str,
components: list[Component],
inventory_id: InventoryId | None = None,
enforce_order: bool = False,
clear: bool = True,
) -> Column
Build a formulation on this sheet from a list of components.
This is the primary way to create a formulation. Each component
(Component) contributes an ingredient and its amount, which are
written into a formulation column. Adding rows for any new ingredients and
maintaining the column's Total cell are handled automatically. Building a
formulation this way is what registers a Formula inventory item
(InventoryItem).
If a column named formulation_name already exists and clear is True,
that column is emptied and reused; otherwise a new formulation column is added.
Example
from albert import Albert
from albert.resources.sheets import Component
client = Albert()
worksheet = client.worksheets.get_by_project_id(project_id="PROA9999999")
sheet = worksheet.sheets[0]
column = sheet.add_formulation(
formulation_name="Formulation A",
components=[
Component(inventory_id="INVA9999999", amount=80.0),
Component(inventory_id="INVA9999998", amount=20.0),
],
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
formulation_name
|
str
|
The name of the formulation, used as the column header. |
required |
components
|
list[Component]
|
The ingredients and their amounts to place in the formulation. |
required |
inventory_id
|
InventoryId
|
The inventory ID of an existing formulation column to target
(format |
None
|
enforce_order
|
bool
|
When True, ingredient rows are arranged to match the order of
|
False
|
clear
|
bool
|
When True, an existing column with the same name is cleared and reused rather than adding a duplicate. Default is True. |
True
|
Returns:
| Type | Description |
|---|---|
Column
|
The formulation column that was created or updated. |
Source code in src/albert/resources/sheets.py
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 | |
add_components_to_formulation
add_components_to_formulation(
*,
formulation_name: str | None = None,
column_id: str | None = None,
inventory_id: InventoryId | None = None,
components: list[Component],
enforce_order: bool = False,
) -> Column
Add components to an existing formulation column without clearing other cells.
Exactly one of column_id, inventory_id, or formulation_name must be provided.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
formulation_name
|
str
|
The name of the formulation column. |
None
|
column_id
|
str
|
The column ID of the formulation column. |
None
|
inventory_id
|
str
|
The inventory ID of the formulation column. |
None
|
components
|
list[Component]
|
The components to append. |
required |
enforce_order
|
bool
|
When True, rows are inserted in the order of |
False
|
Returns:
| Type | Description |
|---|---|
Column
|
The updated formulation column. |
Source code in src/albert/resources/sheets.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 | |
add_formulation_columns
add_formulation_columns(
*,
formulation_names: list[str],
starting_position: dict | None = None,
) -> list[Column]
Add one or more empty formulation columns to this sheet.
Creates the formulation columns without populating any ingredient amounts.
To build a formulation and fill in its components in one step, use
add_formulation instead.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
formulation_names
|
list[str]
|
The names of the formulation columns to add, used as column headers. |
required |
starting_position
|
dict
|
Where to insert the new columns, as a dict with |
None
|
Returns:
| Type | Description |
|---|---|
list[Column]
|
The created formulation columns, in the order requested. |
Source code in src/albert/resources/sheets.py
add_blank_row
add_blank_row(
*,
row_name: str,
design: DesignType = PRODUCTS,
position: dict | None = None,
)
Add a blank (BLK) row to a Design section of this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
row_name
|
str
|
The display name of the new row. |
required |
design
|
DesignType
|
Which Design section to add the row to. Default is |
PRODUCTS
|
position
|
dict
|
Where to insert the row, as a dict with |
None
|
Returns:
| Type | Description |
|---|---|
Row
|
The created row. |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If |
Source code in src/albert/resources/sheets.py
1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 | |
add_inventory_row
Add an ingredient (inventory) row to the Product Design.
The row represents an inventory item that can then carry amounts in each
formulation column. The INV prefix is added to inventory_id if absent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_id
|
str
|
The inventory ID of the item to add as a row (format |
required |
position
|
dict
|
Where to insert the row, as a dict with |
None
|
Returns:
| Type | Description |
|---|---|
Row
|
The created inventory row. |
Source code in src/albert/resources/sheets.py
add_lookup_row
add_lookup_row(
*,
name: str,
design: DesignType | str | None = APPS,
reference_id: str = "ROW1",
position: RowPosition = ABOVE,
) -> Row
Add a lookup (LKP) row to a design.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The display name of the new row. |
required |
design
|
DesignType or str
|
Which design to add the row to. Default is |
APPS
|
reference_id
|
str
|
The row ID to insert relative to. Defaults to |
'ROW1'
|
position
|
RowPosition
|
Whether to insert |
ABOVE
|
Returns:
| Type | Description |
|---|---|
Row
|
The created row. |
Source code in src/albert/resources/sheets.py
add_app_row
add_app_row(
*,
app_id: str,
name: str,
config: RowConfig | None = None,
design: DesignType | str | None = APPS,
reference_id: str = "ROW1",
position: RowPosition = ABOVE,
) -> Row
Add an application (APP) row to a design.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_id
|
str
|
The ID of the application. The |
required |
name
|
str
|
The display name of the row. |
required |
config
|
RowConfig
|
Row configuration ( |
None
|
design
|
DesignType or str
|
Which design to add the row to. Default is |
APPS
|
reference_id
|
str
|
The row ID to insert relative to. Defaults to |
'ROW1'
|
position
|
RowPosition
|
Whether to insert |
ABOVE
|
Returns:
| Type | Description |
|---|---|
Row
|
The created row. |
Source code in src/albert/resources/sheets.py
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 | |
add_parameter_group_row
add_parameter_group_row(
*,
parameter_group_id: ParameterGroupId,
reference_id: str | None = None,
position: RowPosition = ABOVE,
) -> Row
Add a parameter group (PRG) row to this sheet's Process Design.
The platform expands the PRG into one PRM row per parameter in the group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_group_id
|
ParameterGroupId
|
The Parameter Group ID to add (format |
required |
reference_id
|
str
|
The row ID to insert relative to. Defaults to the first Process Design
row when one exists. Omit (or leave |
None
|
position
|
RowPosition
|
Whether to insert |
ABOVE
|
Returns:
| Type | Description |
|---|---|
Row
|
The created PRG row. |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If the sheet has no Process Design section, or the response has no rows. |
Source code in src/albert/resources/sheets.py
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 | |
update_cells
Write changed cells back to the sheet.
Compares each cell against the current grid and sends only the changed
attributes (value, calculation, formatting, bounds). Higher-level methods
such as add_formulation and recolor_cells call this
for you; use it directly when editing cells obtained from the grid.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cells
|
list[Cell]
|
The cells to update. Typically copies of existing cells with modified values or formatting. |
required |
Returns:
| Type | Description |
|---|---|
tuple[list[Cell], list[Cell]]
|
A |
Source code in src/albert/resources/sheets.py
1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 | |
add_blank_column
add_blank_column(
*,
name: str,
reference_id: str | None = None,
position: ColumnPosition = RIGHT_OF,
) -> Column
Add a blank (BLK) column to this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The display name of the new column. |
required |
reference_id
|
str
|
The column ID to insert relative to. Defaults to the last column in the sheet. |
None
|
position
|
ColumnPosition
|
Whether to insert |
RIGHT_OF
|
Returns:
| Type | Description |
|---|---|
Column
|
The created column. |
Source code in src/albert/resources/sheets.py
add_lookup_column
add_lookup_column(
*,
name: str,
reference_id: str | None = None,
position: ColumnPosition = RIGHT_OF,
) -> Column
Add a lookup (LKP) column to this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The display name of the new column. |
required |
reference_id
|
str
|
The column ID to insert relative to. Defaults to the last column in the sheet. |
None
|
position
|
ColumnPosition
|
Whether to insert |
RIGHT_OF
|
Returns:
| Type | Description |
|---|---|
Column
|
The created column. |
Source code in src/albert/resources/sheets.py
add_function_column
add_function_column(
*,
name: str,
reference_id: str | None = None,
position: ColumnPosition = RIGHT_OF,
) -> Column
Add a function (FNC) column to this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The display name of the new column. |
required |
reference_id
|
str
|
The column ID to insert relative to. Defaults to the last column in the sheet. |
None
|
position
|
ColumnPosition
|
Whether to insert |
RIGHT_OF
|
Returns:
| Type | Description |
|---|---|
Column
|
The created column. |
Source code in src/albert/resources/sheets.py
add_property_column
add_property_column(
*,
name: str,
attribute_id: str,
data_column_id: DataColumnId | None = None,
data_column_name: str | None = None,
reference_id: str | None = None,
position: ColumnPosition = RIGHT_OF,
) -> Column
Add a property/result (RSL) column to this sheet.
Exactly one of data_column_id or data_column_name must be provided;
the other is fetched automatically.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The display name of the new column. |
required |
attribute_id
|
str
|
The ID of the attribute (e.g. |
required |
data_column_id
|
DataColumnId
|
The data column ID (e.g. |
None
|
data_column_name
|
str
|
The data column name. Fetched from the API if omitted. |
None
|
reference_id
|
str
|
The column ID to insert relative to. Defaults to the last column in the sheet. |
None
|
position
|
ColumnPosition
|
Whether to insert |
RIGHT_OF
|
Returns:
| Type | Description |
|---|---|
Column
|
The created column. |
Source code in src/albert/resources/sheets.py
2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 | |
pin_columns
Pin one or more columns to the left or right edge of the sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
col_ids
|
list[str]
|
The column IDs to pin. |
required |
side
|
'left' or 'right'
|
Which edge to pin to. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
unpin_columns
Unpin one or more columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
col_ids
|
list[str]
|
The column IDs to unpin. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
set_columns_width
Set the display width of one or more columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
col_ids
|
list[str]
|
Column IDs to update. |
required |
width
|
str
|
Width value, e.g. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
hide_column
hide_column(*, col_id: str) -> None
Hide a column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
col_id
|
str
|
The column ID to hide. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
show_column
show_column(*, col_id: str) -> None
Show a hidden column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
col_id
|
str
|
The column ID to show. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
delete_column
delete_column(*, column_id: str) -> None
Delete a column from this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_id
|
str
|
The ID of the column to delete. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
delete_row
Delete a row from a Design section of this sheet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
row_id
|
str
|
The ID of the row to delete. |
required |
design_id
|
str
|
The ID of the Design (section) the row belongs to. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/resources/sheets.py
get_column
get_column(
*,
column_id: str | None = None,
inventory_id: InventoryId | None = None,
column_name: str | None = None,
) -> Column
Retrieve a Column by its column ID, underlying inventory ID, or header name.
Provide at least one of the three identifiers; the match must be unique.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_id
|
str
|
The sheet column ID to match (e.g. |
None
|
inventory_id
|
str
|
The underlying inventory ID to match (e.g. |
None
|
column_name
|
str
|
The human-readable header name of the column (e.g. |
None
|
Returns:
| Type | Description |
|---|---|
Column
|
The matching column. |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If no identifier is provided, no matching column is found, or multiple columns match. |
Source code in src/albert/resources/sheets.py
2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 | |
lock_column
lock_column(
*,
column_id: str | None = None,
inventory_id: InventoryId | None = None,
column_name: str | None = None,
locked: bool = True,
) -> Column
Lock or unlock a column in the sheet.
The column can be specified by its sheet column ID (e.g. "COL5"),
by the underlying inventory identifier of a formulation/product, or by
the displayed header name. By default the column will be locked; pass
locked=False to unlock it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column_id
|
str | None
|
The sheet column ID to match. |
None
|
inventory_id
|
str | None
|
The inventory identifier of the formulation or product to match. |
None
|
column_name
|
str | None
|
The displayed header name of the column. |
None
|
locked
|
bool
|
Whether to lock ( |
True
|
Returns:
| Type | Description |
|---|---|
Column
|
The column that was updated. |
Source code in src/albert/resources/sheets.py
2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 | |
Column
Bases: BaseSessionResource
A column in a Sheet.
A Column is a live grid element that carries the session. A column can be a
formulation (the most common case for the SDK), a lookup column that displays
an inventory attribute, an ingredient name, or another type given by
CellType. Its cells are read through cells and written back
with update_cells.
Methods:
| Name | Description |
|---|---|
rename |
Rename the column. |
recolor_cells |
Apply a background color to every cell in the column. |
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"
},
"CellType": {
"description": "The kind of content a Cell, Column, or Row holds.\n\nCells, Columns, and Rows all carry a type drawn from this enum, which\ndetermines how the platform interprets their contents. The values most\nrelevant when building formulations are ``INVENTORY`` (an ingredient amount),\n``TOTAL`` (a computed total row), ``FORMULA`` and ``FOR`` (formulation\ncolumns), ``LKP`` (a lookup that displays an inventory attribute), and\n``BLANK`` (an empty cell). The remaining members correspond to specialized\ngrid content such as tags, prices, tasks, results, and apps.",
"enum": [
"INV",
"APP",
"BLK",
"Formula",
"TAG",
"PRC",
"PDC",
"BAT",
"TOT",
"TAS",
"DEF",
"LKP",
"FOR",
"EXTINV",
"BTI",
"PRM",
"PRG",
"RSL",
"FNC",
"WFL",
"DAC",
"INT",
"DAT",
"NDR",
"PIC"
],
"title": "CellType",
"type": "string"
},
"Design": {
"description": "One section of a Sheet, backing the grid for a single [`DesignType`][albert.resources.sheets.DesignType].\n\nA Sheet is made up of stacked sections (Product Design, Process Design,\nResults, and Apps) and each section is a Design. Designs are largely an\ninternal detail: most work is done through the parent [`Sheet`][albert.resources.sheets.Sheet], which\nexposes its Designs as [`product_design`][albert.resources.sheets.Sheet.product_design],\n[`result_design`][albert.resources.sheets.Sheet.result_design], [`app_design`][albert.resources.sheets.Sheet.app_design], and\n[`process_design`][albert.resources.sheets.Sheet.process_design]. A Design is a live grid element that carries the\nsession and lazily loads its rows, columns, and grid on first access.\nMethods\n-------\ngroup_rows(name, child_row_ids, ...) -> RowGroup\n Create a named row group within this design.\nget_groups(refresh=False) -> list[RowGroup]\n Get all row groups in this design.",
"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."
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignState"
},
{
"type": "null"
}
],
"default": null,
"description": "The display state of the design. Optional. Default is None."
},
"albertId": {
"description": "The Albert ID of the design.",
"title": "Albertid",
"type": "string"
},
"designType": {
"anyOf": [
{
"$ref": "#/$defs/DesignType"
},
{
"type": "string"
}
],
"description": "The section of the Sheet this design backs. See [`DesignType`][albert.resources.sheets.DesignType]. Unknown legacy/tenant values parse as plain strings.",
"title": "Designtype"
}
},
"required": [
"albertId",
"designType"
],
"title": "Design",
"type": "object"
},
"DesignState": {
"description": "The display state of a Design section within a Sheet.",
"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."
},
"collapsed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the Design section is collapsed in the Sheet view. Default is False.",
"title": "Collapsed"
}
},
"title": "DesignState",
"type": "object"
},
"DesignType": {
"description": "The section of a Sheet that a Design represents.\n\nA Sheet is organized into stacked sections, each backed by a Design\n([`Design`][albert.resources.sheets.Design]). The type identifies which section:\n\n- ``PRODUCTS``: Product Design, where formulations are built.\n- ``PROCESS``: Process Design.\n- ``RESULTS``: Results, holding Property Tasks and their data.\n- ``APPS``: Apps, holding insights, reporting, and notes.",
"enum": [
"apps",
"products",
"results",
"process",
"reagents"
],
"title": "DesignType",
"type": "string"
},
"Sheet": {
"description": "An interactive grid within a Worksheet where formulations are built.\n\nA Sheet is one grid inside a Worksheet ([`Worksheet`][albert.resources.worksheets.Worksheet]).\nIt is organized into stacked sections, each a [`Design`][albert.resources.sheets.Design]: Product Design\n(where formulations are built), Process Design, Results (Property Tasks and\ntheir data), and Apps (insights and notes). Access those sections through\n[`product_design`][albert.resources.sheets.Sheet.product_design], [`process_design`][albert.resources.sheets.Sheet.process_design], [`result_design`][albert.resources.sheets.Sheet.result_design], and\n[`app_design`][albert.resources.sheets.Sheet.app_design].\n\nA Sheet Column can be a formulation (the most common case for the SDK), a\nlookup column that displays an inventory attribute, or an ingredient name.\nRows typically represent ingredients (inventory items) and their amounts.\nAdding a formulation to a Sheet is what registers a Formula inventory item.\n\nThe Sheet is a live grid element that carries the session; its cells, columns,\nand rows are themselves interactive. Retrieve a Sheet from a Worksheet's\n[`sheets`][albert.resources.worksheets.Worksheet.sheets], then edit it in place\nwith the methods below.\n\n!!! example\n ```python\n from albert import Albert\n client = Albert()\n worksheet = client.worksheets.get_by_project_id(project_id=\"PROA9999999\")\n sheet = worksheet.sheets[0]\n print(sheet.grid)\n ```\nMethods\n-------\nrename(new_name) -> Sheet\n Rename the sheet.\nadd_formulation(formulation_name, components, ...) -> Column\n Build a formulation column from a list of components (registers a Formula).\nadd_components_to_formulation(components, ...) -> Column\n Add components to an existing formulation column.\nadd_formulation_columns(formulation_names, ...) -> list[Column]\n Add one or more empty formulation columns.\nadd_inventory_row(inventory_id, ...) -> Row\n Add an ingredient (inventory) row.\nadd_blank_row(row_name, ...) -> Row\n Add a blank row.\nadd_lookup_row(name, ...) -> Row\n Add a lookup row.\nadd_app_row(app_id, name, ...) -> Row\n Add an application row.\nadd_parameter_group_row(parameter_group_id, ...) -> Row\n Add a parameter group (PRG) row to Process Design.\nadd_blank_column(name, ...) -> Column\n Add a blank column.\nadd_lookup_column(name, ...) -> Column\n Add a lookup column.\nadd_function_column(name, ...) -> Column\n Add a function column.\nadd_property_column(name, attribute_id, ...) -> Column\n Add a property/result column.\nget_column(...) -> Column\n Retrieve a column by column ID, inventory ID, or name.\nupdate_cells(cells) -> tuple[list[Cell], list[Cell]]\n Write changed cells back to the sheet.\npin_columns(col_ids, side) -> None\n Pin columns to the left or right edge.\nunpin_columns(col_ids) -> None\n Unpin columns.\nlock_column(...) -> Column\n Lock or unlock a column.\nhide_column(col_id) -> None\n Hide a column.\nshow_column(col_id) -> None\n Show a hidden column.\nset_columns_width(col_ids, width) -> None\n Set the display width of columns.\ndelete_column(column_id) -> None\n Delete a column.\ndelete_row(row_id, design_id) -> None\n Delete a row.",
"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."
},
"albertId": {
"description": "The Albert ID of the sheet.",
"title": "Albertid",
"type": "string"
},
"name": {
"description": "The name of the sheet.",
"title": "Name",
"type": "string"
},
"Formulas": {
"description": "References to the formulations present on the sheet.",
"items": {
"$ref": "#/$defs/SheetFormulationRef"
},
"title": "Formulas",
"type": "array"
},
"hidden": {
"description": "Whether the sheet is hidden.",
"title": "Hidden",
"type": "boolean"
},
"isColumnRight": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "When True, copied columns are placed to the right of the source column; when False, to the left.",
"title": "Iscolumnright"
},
"colSizeMode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Column width sizing mode. Allowed values are ``\"minimum\"`` and ``\"fitToColumn\"``. ``None`` resets to the default grid width.",
"title": "Colsizemode"
},
"Designs": {
"description": "The Designs (sections) of the sheet.",
"items": {
"$ref": "#/$defs/Design"
},
"title": "Designs",
"type": "array"
},
"projectId": {
"description": "The ID of the Project the sheet belongs to (format ``PRO...``).",
"title": "Projectid",
"type": "string"
}
},
"required": [
"albertId",
"name",
"hidden",
"Designs",
"projectId"
],
"title": "Sheet",
"type": "object"
},
"SheetFormulationRef": {
"description": "A reference to a formulation in a sheet",
"properties": {
"id": {
"description": "The Albert ID of the inventory item that is the formulation",
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the formulation",
"title": "Name"
},
"hidden": {
"description": "Whether the formulation is hidden",
"title": "Hidden",
"type": "boolean"
}
},
"required": [
"id",
"hidden"
],
"title": "SheetFormulationRef",
"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"
}
},
"description": "A column in a Sheet.\n\nA Column is a live grid element that carries the session. A column can be a\nformulation (the most common case for the SDK), a lookup column that displays\nan inventory attribute, an ingredient name, or another type given by\n[`CellType`][albert.resources.sheets.CellType]. Its cells are read through [`cells`][albert.resources.sheets.Column.cells] and written back\nwith [`update_cells`][albert.resources.sheets.Sheet.update_cells].\nMethods\n-------\nrename(new_name) -> Column\n Rename the column.\nrecolor_cells(color) -> tuple[list[Cell], list[Cell]]\n Apply a background color to every cell in the column.",
"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."
},
"colId": {
"description": "The ID of the column.",
"title": "Colid",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The header name of the column. Optional. Default is None.",
"title": "Name"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/CellType"
},
{
"type": "string"
}
],
"description": "The type of the column. Allowed values are the same as for [`CellType`][albert.resources.sheets.CellType].",
"title": "Type"
},
"sheet": {
"$ref": "#/$defs/Sheet",
"description": "The sheet the column belongs to."
},
"inventory_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "For a formulation column, the underlying inventory ID (format ``INV...``). Optional. Default is None.",
"title": "Inventory Id"
},
"locked": {
"default": false,
"description": "Whether the column is locked against edits. Default is False.",
"title": "Locked",
"type": "boolean"
},
"hidden": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the column is hidden. Optional. Default is None.",
"title": "Hidden"
},
"pinned": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The edge the column is pinned to (``\"left\"`` or ``\"right\"``), or None.",
"title": "Pinned"
},
"column_width": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display width of the column (e.g. ``\"142px\"``), or None.",
"title": "Column Width"
}
},
"required": [
"colId",
"type",
"sheet"
],
"title": "Column",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
_session(AlbertSession | None) -
column_id(str) -
name(str | None) -
type(CellType | str) -
sheet(Sheet) -
inventory_id(str | None) -
locked(bool) -
hidden(bool | None) -
pinned(str | None) -
column_width(str | None)
Validators:
-
_none_to_false→locked
Source code in src/albert/core/shared/models/base.py
inventory_id
inventory_id: str | None = None
For a formulation column, the underlying inventory ID (format INV...). Optional. Default is None.
column_width
column_width: str | None = None
The display width of the column (e.g. "142px"), or None.
cells
This column's cells as a pandas Series keyed by row id.
Empty cells may appear as NaN floats (pandas padding); check
isinstance(value, Cell) before using a value.
rename
Rename this column.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_name
|
str
|
The new header name for the column. |
required |
Returns:
| Type | Description |
|---|---|
Column
|
This column, with its name updated. |
Source code in src/albert/resources/sheets.py
recolor_cells
recolor_cells(color: CellColor)
Apply a background color to every cell in this column.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
color
|
CellColor
|
The background color to apply. |
required |
Returns:
| Type | Description |
|---|---|
tuple[list[Cell], list[Cell]]
|
A |
Source code in src/albert/resources/sheets.py
Row
Bases: BaseSessionResource
A row in a Sheet.
A Row is a live grid element that carries the session. Rows typically
represent ingredients (inventory items) and their amounts, but a row can also
be a total, lookup, app, or blank row per its type. Each row belongs
to a specific Design section of the sheet. Its cells are read
through cells and written back with update_cells.
Methods:
| Name | Description |
|---|---|
recolor_cells |
Apply a background color to every cell in the row. |
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"
},
"CellType": {
"description": "The kind of content a Cell, Column, or Row holds.\n\nCells, Columns, and Rows all carry a type drawn from this enum, which\ndetermines how the platform interprets their contents. The values most\nrelevant when building formulations are ``INVENTORY`` (an ingredient amount),\n``TOTAL`` (a computed total row), ``FORMULA`` and ``FOR`` (formulation\ncolumns), ``LKP`` (a lookup that displays an inventory attribute), and\n``BLANK`` (an empty cell). The remaining members correspond to specialized\ngrid content such as tags, prices, tasks, results, and apps.",
"enum": [
"INV",
"APP",
"BLK",
"Formula",
"TAG",
"PRC",
"PDC",
"BAT",
"TOT",
"TAS",
"DEF",
"LKP",
"FOR",
"EXTINV",
"BTI",
"PRM",
"PRG",
"RSL",
"FNC",
"WFL",
"DAC",
"INT",
"DAT",
"NDR",
"PIC"
],
"title": "CellType",
"type": "string"
},
"Design": {
"description": "One section of a Sheet, backing the grid for a single [`DesignType`][albert.resources.sheets.DesignType].\n\nA Sheet is made up of stacked sections (Product Design, Process Design,\nResults, and Apps) and each section is a Design. Designs are largely an\ninternal detail: most work is done through the parent [`Sheet`][albert.resources.sheets.Sheet], which\nexposes its Designs as [`product_design`][albert.resources.sheets.Sheet.product_design],\n[`result_design`][albert.resources.sheets.Sheet.result_design], [`app_design`][albert.resources.sheets.Sheet.app_design], and\n[`process_design`][albert.resources.sheets.Sheet.process_design]. A Design is a live grid element that carries the\nsession and lazily loads its rows, columns, and grid on first access.\nMethods\n-------\ngroup_rows(name, child_row_ids, ...) -> RowGroup\n Create a named row group within this design.\nget_groups(refresh=False) -> list[RowGroup]\n Get all row groups in this design.",
"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."
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignState"
},
{
"type": "null"
}
],
"default": null,
"description": "The display state of the design. Optional. Default is None."
},
"albertId": {
"description": "The Albert ID of the design.",
"title": "Albertid",
"type": "string"
},
"designType": {
"anyOf": [
{
"$ref": "#/$defs/DesignType"
},
{
"type": "string"
}
],
"description": "The section of the Sheet this design backs. See [`DesignType`][albert.resources.sheets.DesignType]. Unknown legacy/tenant values parse as plain strings.",
"title": "Designtype"
}
},
"required": [
"albertId",
"designType"
],
"title": "Design",
"type": "object"
},
"DesignState": {
"description": "The display state of a Design section within a Sheet.",
"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."
},
"collapsed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the Design section is collapsed in the Sheet view. Default is False.",
"title": "Collapsed"
}
},
"title": "DesignState",
"type": "object"
},
"DesignType": {
"description": "The section of a Sheet that a Design represents.\n\nA Sheet is organized into stacked sections, each backed by a Design\n([`Design`][albert.resources.sheets.Design]). The type identifies which section:\n\n- ``PRODUCTS``: Product Design, where formulations are built.\n- ``PROCESS``: Process Design.\n- ``RESULTS``: Results, holding Property Tasks and their data.\n- ``APPS``: Apps, holding insights, reporting, and notes.",
"enum": [
"apps",
"products",
"results",
"process",
"reagents"
],
"title": "DesignType",
"type": "string"
},
"RowConfig": {
"description": "Configuration for an APP or location-type row.",
"properties": {
"option": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Option"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"title": "RowConfig",
"type": "object"
},
"Sheet": {
"description": "An interactive grid within a Worksheet where formulations are built.\n\nA Sheet is one grid inside a Worksheet ([`Worksheet`][albert.resources.worksheets.Worksheet]).\nIt is organized into stacked sections, each a [`Design`][albert.resources.sheets.Design]: Product Design\n(where formulations are built), Process Design, Results (Property Tasks and\ntheir data), and Apps (insights and notes). Access those sections through\n[`product_design`][albert.resources.sheets.Sheet.product_design], [`process_design`][albert.resources.sheets.Sheet.process_design], [`result_design`][albert.resources.sheets.Sheet.result_design], and\n[`app_design`][albert.resources.sheets.Sheet.app_design].\n\nA Sheet Column can be a formulation (the most common case for the SDK), a\nlookup column that displays an inventory attribute, or an ingredient name.\nRows typically represent ingredients (inventory items) and their amounts.\nAdding a formulation to a Sheet is what registers a Formula inventory item.\n\nThe Sheet is a live grid element that carries the session; its cells, columns,\nand rows are themselves interactive. Retrieve a Sheet from a Worksheet's\n[`sheets`][albert.resources.worksheets.Worksheet.sheets], then edit it in place\nwith the methods below.\n\n!!! example\n ```python\n from albert import Albert\n client = Albert()\n worksheet = client.worksheets.get_by_project_id(project_id=\"PROA9999999\")\n sheet = worksheet.sheets[0]\n print(sheet.grid)\n ```\nMethods\n-------\nrename(new_name) -> Sheet\n Rename the sheet.\nadd_formulation(formulation_name, components, ...) -> Column\n Build a formulation column from a list of components (registers a Formula).\nadd_components_to_formulation(components, ...) -> Column\n Add components to an existing formulation column.\nadd_formulation_columns(formulation_names, ...) -> list[Column]\n Add one or more empty formulation columns.\nadd_inventory_row(inventory_id, ...) -> Row\n Add an ingredient (inventory) row.\nadd_blank_row(row_name, ...) -> Row\n Add a blank row.\nadd_lookup_row(name, ...) -> Row\n Add a lookup row.\nadd_app_row(app_id, name, ...) -> Row\n Add an application row.\nadd_parameter_group_row(parameter_group_id, ...) -> Row\n Add a parameter group (PRG) row to Process Design.\nadd_blank_column(name, ...) -> Column\n Add a blank column.\nadd_lookup_column(name, ...) -> Column\n Add a lookup column.\nadd_function_column(name, ...) -> Column\n Add a function column.\nadd_property_column(name, attribute_id, ...) -> Column\n Add a property/result column.\nget_column(...) -> Column\n Retrieve a column by column ID, inventory ID, or name.\nupdate_cells(cells) -> tuple[list[Cell], list[Cell]]\n Write changed cells back to the sheet.\npin_columns(col_ids, side) -> None\n Pin columns to the left or right edge.\nunpin_columns(col_ids) -> None\n Unpin columns.\nlock_column(...) -> Column\n Lock or unlock a column.\nhide_column(col_id) -> None\n Hide a column.\nshow_column(col_id) -> None\n Show a hidden column.\nset_columns_width(col_ids, width) -> None\n Set the display width of columns.\ndelete_column(column_id) -> None\n Delete a column.\ndelete_row(row_id, design_id) -> None\n Delete a row.",
"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."
},
"albertId": {
"description": "The Albert ID of the sheet.",
"title": "Albertid",
"type": "string"
},
"name": {
"description": "The name of the sheet.",
"title": "Name",
"type": "string"
},
"Formulas": {
"description": "References to the formulations present on the sheet.",
"items": {
"$ref": "#/$defs/SheetFormulationRef"
},
"title": "Formulas",
"type": "array"
},
"hidden": {
"description": "Whether the sheet is hidden.",
"title": "Hidden",
"type": "boolean"
},
"isColumnRight": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "When True, copied columns are placed to the right of the source column; when False, to the left.",
"title": "Iscolumnright"
},
"colSizeMode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Column width sizing mode. Allowed values are ``\"minimum\"`` and ``\"fitToColumn\"``. ``None`` resets to the default grid width.",
"title": "Colsizemode"
},
"Designs": {
"description": "The Designs (sections) of the sheet.",
"items": {
"$ref": "#/$defs/Design"
},
"title": "Designs",
"type": "array"
},
"projectId": {
"description": "The ID of the Project the sheet belongs to (format ``PRO...``).",
"title": "Projectid",
"type": "string"
}
},
"required": [
"albertId",
"name",
"hidden",
"Designs",
"projectId"
],
"title": "Sheet",
"type": "object"
},
"SheetFormulationRef": {
"description": "A reference to a formulation in a sheet",
"properties": {
"id": {
"description": "The Albert ID of the inventory item that is the formulation",
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the formulation",
"title": "Name"
},
"hidden": {
"description": "Whether the formulation is hidden",
"title": "Hidden",
"type": "boolean"
}
},
"required": [
"id",
"hidden"
],
"title": "SheetFormulationRef",
"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"
}
},
"description": "A row in a Sheet.\n\nA Row is a live grid element that carries the session. Rows typically\nrepresent ingredients (inventory items) and their amounts, but a row can also\nbe a total, lookup, app, or blank row per its [`type`][albert.resources.sheets.Row.type]. Each row belongs\nto a specific [`Design`][albert.resources.sheets.Design] section of the [`sheet`][albert.resources.sheets.Row.sheet]. Its cells are read\nthrough [`cells`][albert.resources.sheets.Row.cells] and written back with [`update_cells`][albert.resources.sheets.Sheet.update_cells].\nMethods\n-------\nrecolor_cells(color) -> tuple[list[Cell], list[Cell]]\n Apply a background color to every cell in the row.",
"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."
},
"rowId": {
"description": "The ID of the row.",
"title": "Rowid",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/CellType"
},
{
"type": "string"
}
],
"description": "The type of the row. Allowed values are the same as for [`CellType`][albert.resources.sheets.CellType].",
"title": "Type"
},
"design": {
"$ref": "#/$defs/Design",
"description": "The Design (section) the row belongs to."
},
"sheet": {
"$ref": "#/$defs/Sheet",
"description": "The sheet the row belongs to."
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the row. Optional. Default is None.",
"title": "Name"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "For an ingredient row, the inventory ID of the item (format ``INV...``). Optional. Default is None.",
"title": "Id"
},
"manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The manufacturer of the row's inventory item. Optional. Default is None.",
"title": "Manufacturer"
},
"config": {
"anyOf": [
{
"$ref": "#/$defs/RowConfig"
},
{
"type": "null"
}
],
"default": null,
"description": "Configuration for APP or location-scoped rows. Optional. Default is None."
},
"parent_row_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The row ID of the group header this row belongs to. None if not grouped.",
"title": "Parent Row Id"
},
"child_row_ids": {
"description": "Row IDs of rows grouped under this row. Non-empty only on group header rows.",
"items": {
"type": "string"
},
"title": "Child Row Ids",
"type": "array"
}
},
"required": [
"rowId",
"type",
"design",
"sheet"
],
"title": "Row",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
_session(AlbertSession | None) -
row_id(str) -
type(CellType | str) -
design(Design) -
sheet(Sheet) -
name(str | None) -
inventory_id(str | None) -
manufacturer(str | None) -
config(RowConfig | None) -
parent_row_id(str | None) -
child_row_ids(list[str])
Validators:
-
_coerce_config→config
Source code in src/albert/core/shared/models/base.py
inventory_id
inventory_id: str | None = None
For an ingredient row, the inventory ID of the item (format INV...). Optional. Default is None.
manufacturer
manufacturer: str | None = None
The manufacturer of the row's inventory item. Optional. Default is None.
config
config: RowConfig | None = None
Configuration for APP or location-scoped rows. Optional. Default is None.
parent_row_id
parent_row_id: str | None = None
The row ID of the group header this row belongs to. None if not grouped.
child_row_ids
Row IDs of rows grouped under this row. Non-empty only on group header rows.
cells
This row's cells as a pandas Series keyed by column df-name.
Empty cells may appear as NaN floats (pandas padding); check
isinstance(value, Cell) before using a value.
recolor_cells
recolor_cells(color: CellColor)
Apply a background color to every cell in this row.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
color
|
CellColor
|
The background color to apply. |
required |
Returns:
| Type | Description |
|---|---|
tuple[list[Cell], list[Cell]]
|
A |