Product Design
albert.resources.product_design
CasLevelSubstance
Bases: BaseAlbertModel
A single CAS-level substance in an unpacked product's composition.
Show JSON schema:
{
"description": "A single CAS-level substance in an unpacked product's composition.",
"properties": {
"casPrimaryKeyId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Internal key identifying the CAS record for this substance.",
"title": "Casprimarykeyid"
},
"casID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS identifier for the substance (registry number or ``CAS...`` id).",
"title": "Casid"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Regulatory DB substance identifier for this CAS entry.\n\nPrefer this over ``cas_id`` when looking a substance up in the Regulatory DB\n(see [`SubstanceV4Collection`][albert.collections.substance_v4.SubstanceV4Collection]):\na single CAS number can map to more than one substance record, so the substance\nID is the precise key.",
"title": "Substanceid"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the ingredient this substance was unpacked from.",
"title": "Albertid"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount of this substance in the unpacked composition.",
"title": "Amount"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum proportion of this substance in the unpacked composition.",
"title": "Min"
},
"target": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target proportion of this substance in the unpacked composition.",
"title": "Target"
},
"aggregatedFunc": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregated function values associated with this substance, when present.",
"title": "Aggregatedfunc"
}
},
"title": "CasLevelSubstance",
"type": "object"
}
Fields:
-
cas_primary_key_id(str | None) -
cas_id(str | None) -
substance_id(str | None) -
albert_id(str | None) -
amount(float | None) -
min(float | None) -
target(float | None) -
aggregated_func(list[Any] | None)
cas_primary_key_id
cas_primary_key_id: str | None = None
Internal key identifying the CAS record for this substance.
cas_id
cas_id: str | None = None
The CAS identifier for the substance (registry number or CAS... id).
substance_id
substance_id: str | None = None
The Regulatory DB substance identifier for this CAS entry.
Prefer this over cas_id when looking a substance up in the Regulatory DB
(see SubstanceV4Collection):
a single CAS number can map to more than one substance record, so the substance
ID is the precise key.
albert_id
albert_id: str | None = None
The Inventory ID of the ingredient this substance was unpacked from.
target
target: float | None = None
The target proportion of this substance in the unpacked composition.
NormalizedCAS
Bases: BaseAlbertModel
A CAS entry with its normalized proportion in the unpacked product.
Show JSON schema:
{
"description": "A CAS entry with its normalized proportion in the unpacked product.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the CAS substance.",
"title": "Name"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The normalized amount of this CAS substance in the product.",
"title": "Value"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier for the CAS record.",
"title": "Albertid"
},
"smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string describing the substance's chemical structure.",
"title": "Smiles"
}
},
"title": "NormalizedCAS",
"type": "object"
}
Fields:
UnpackedInventorySDS
Bases: BaseAlbertModel
Safety data sheet (SDS) and regulatory details for an unpacked ingredient.
Show JSON schema:
{
"description": "Safety data sheet (SDS) and regulatory details for an unpacked ingredient.",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier this SDS information belongs to.",
"title": "Albertid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount associated with this SDS entry.",
"title": "Value"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SDS hazard classification.",
"title": "Class"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The UN number used for transport / regulatory classification.",
"title": "Unnumber"
}
},
"title": "UnpackedInventorySDS",
"type": "object"
}
Fields:
un_number
un_number: str | None = None
The UN number used for transport / regulatory classification.
UnpackedCasInfo
Bases: BaseAlbertModel
CAS composition detail for an ingredient in an unpacked product.
Show JSON schema:
{
"description": "CAS composition detail for an ingredient in an unpacked product.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier for the CAS record.",
"title": "Id"
},
"casID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS identifier for this row, when distinct from ``id`` (e.g. unknown CAS placeholders).",
"title": "Casid"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Regulatory DB substance identifier for this CAS entry.",
"title": "Substanceid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the CAS substance.",
"title": "Name"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum proportion of this substance in the ingredient.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The maximum proportion of this substance in the ingredient.",
"title": "Max"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS registry number (e.g. ``\"7732-18-5\"``).",
"title": "Number"
},
"casAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The averaged CAS proportion.",
"title": "Casavg"
},
"casMinAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum averaged CAS proportion.",
"title": "Casminavg"
},
"casTargetAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target averaged CAS proportion.",
"title": "Castargetavg"
},
"casSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed CAS proportion.",
"title": "Cassum"
},
"minSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed minimum CAS proportion.",
"title": "Minsum"
},
"targetSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed target CAS proportion.",
"title": "Targetsum"
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string for this CAS constituent.",
"title": "Cassmiles"
},
"aggregatedFunc": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregated function values associated with this CAS constituent.",
"title": "Aggregatedfunc"
}
},
"title": "UnpackedCasInfo",
"type": "object"
}
Fields:
-
id(str | None) -
cas_id(str | None) -
substance_id(str | None) -
name(str | None) -
min(float | None) -
max(float | None) -
number(str | None) -
cas_average(float | None) -
cas_min_average(float | None) -
cas_target_average(float | None) -
cas_sum(float | None) -
min_sum(float | None) -
target_sum(float | None) -
cas_smiles(str | None) -
aggregated_func(list[Any] | None)
UnpackedInventoryListItem
Bases: BaseAlbertModel
A single direct ingredient entry linking a formula cell to an item.
Represents one row/column position in the unpacked formula together with the inventory item at that position and its amount. Entries describe one level of the formula only; an entry whose item is itself a formula is not expanded, so summing entries does not give an ingredient's total amount across nested formulas.
Show JSON schema:
{
"description": "A single direct ingredient entry linking a formula cell to an item.\n\nRepresents one row/column position in the unpacked formula together with the\ninventory item at that position and its amount. Entries describe one level of\nthe formula only; an entry whose item is itself a formula is not expanded, so\nsumming entries does not give an ingredient's total amount across nested\nformulas.",
"properties": {
"rowInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the item on this row.",
"title": "Rowinventoryid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount contributed by this entry.",
"title": "Value"
},
"functionValue": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Function values associated with this formula cell, when present.",
"title": "Functionvalue"
},
"colId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the formula column this entry belongs to.",
"title": "Colid"
},
"colInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID associated with the column.",
"title": "Colinventoryid"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the parent formula this entry was unpacked from.",
"title": "Parentid"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the row this entry belongs to.",
"title": "Rowid"
}
},
"title": "UnpackedInventoryListItem",
"type": "object"
}
Fields:
-
row_inventory_id(str | None) -
value(float | None) -
function_value(list[Any] | None) -
column_id(str | None) -
column_inventory_id(str | None) -
parent_id(str | None) -
row_id(str | None)
UnpackedInventory
Bases: UnpackedInventoryListItem
A fully unpacked ingredient (inventory item) within a product.
Extends UnpackedInventoryListItem with the item's identity plus its
resolved SDS information and CAS-level breakdown.
Show JSON schema:
{
"$defs": {
"UnpackedCasInfo": {
"description": "CAS composition detail for an ingredient in an unpacked product.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier for the CAS record.",
"title": "Id"
},
"casID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS identifier for this row, when distinct from ``id`` (e.g. unknown CAS placeholders).",
"title": "Casid"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Regulatory DB substance identifier for this CAS entry.",
"title": "Substanceid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the CAS substance.",
"title": "Name"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum proportion of this substance in the ingredient.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The maximum proportion of this substance in the ingredient.",
"title": "Max"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS registry number (e.g. ``\"7732-18-5\"``).",
"title": "Number"
},
"casAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The averaged CAS proportion.",
"title": "Casavg"
},
"casMinAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum averaged CAS proportion.",
"title": "Casminavg"
},
"casTargetAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target averaged CAS proportion.",
"title": "Castargetavg"
},
"casSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed CAS proportion.",
"title": "Cassum"
},
"minSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed minimum CAS proportion.",
"title": "Minsum"
},
"targetSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed target CAS proportion.",
"title": "Targetsum"
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string for this CAS constituent.",
"title": "Cassmiles"
},
"aggregatedFunc": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregated function values associated with this CAS constituent.",
"title": "Aggregatedfunc"
}
},
"title": "UnpackedCasInfo",
"type": "object"
},
"UnpackedInventorySDS": {
"description": "Safety data sheet (SDS) and regulatory details for an unpacked ingredient.",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier this SDS information belongs to.",
"title": "Albertid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount associated with this SDS entry.",
"title": "Value"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SDS hazard classification.",
"title": "Class"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The UN number used for transport / regulatory classification.",
"title": "Unnumber"
}
},
"title": "UnpackedInventorySDS",
"type": "object"
}
},
"description": "A fully unpacked ingredient (inventory item) within a product.\n\nExtends [`UnpackedInventoryListItem`][albert.resources.product_design.UnpackedInventoryListItem] with the item's identity plus its\nresolved SDS information and CAS-level breakdown.",
"properties": {
"rowInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the item on this row.",
"title": "Rowinventoryid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount contributed by this entry.",
"title": "Value"
},
"functionValue": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Function values associated with this formula cell, when present.",
"title": "Functionvalue"
},
"colId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the formula column this entry belongs to.",
"title": "Colid"
},
"colInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID associated with the column.",
"title": "Colinventoryid"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the parent formula this entry was unpacked from.",
"title": "Parentid"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the row this entry belongs to.",
"title": "Rowid"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the ingredient (format ``INV...``).",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the ingredient.",
"title": "Name"
},
"rsnNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The RSN (registered substance) number for the ingredient.",
"title": "Rsnnumber"
},
"totalCasSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed CAS proportion across the ingredient's constituents.",
"title": "Totalcassum"
},
"sdsInfo": {
"anyOf": [
{
"$ref": "#/$defs/UnpackedInventorySDS"
},
{
"type": "null"
}
],
"default": null,
"description": "The SDS / regulatory details for the ingredient."
},
"casInfo": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedCasInfo"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS-level composition breakdown for the ingredient.",
"title": "Casinfo"
},
"childCas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedCasInfo"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Child CAS rows for the ingredient, including unknown-CAS placeholders.",
"title": "Childcas"
}
},
"title": "UnpackedInventory",
"type": "object"
}
Fields:
-
row_inventory_id(str | None) -
value(float | None) -
function_value(list[Any] | None) -
column_id(str | None) -
column_inventory_id(str | None) -
parent_id(str | None) -
row_id(str | None) -
id(str | None) -
name(str | None) -
rsn_number(str | None) -
total_cas_sum(float | None) -
sds_info(UnpackedInventorySDS | None) -
cas_info(list[UnpackedCasInfo] | None) -
child_cas(list[UnpackedCasInfo] | None)
total_cas_sum
total_cas_sum: float | None = None
The summed CAS proportion across the ingredient's constituents.
sds_info
sds_info: UnpackedInventorySDS | None = None
The SDS / regulatory details for the ingredient.
cas_info
cas_info: list[UnpackedCasInfo] | None = None
The CAS-level composition breakdown for the ingredient.
child_cas
child_cas: list[UnpackedCasInfo] | None = None
Child CAS rows for the ingredient, including unknown-CAS placeholders.
UnpackedProductDesign
Bases: BaseAlbertModel
The full unpacked composition of a single formulated product.
Returned by
get_unpacked_products,
one per formula that was unpacked. Unpacking recursively resolves the
formulation's ingredient tree into two views: a row-level inventory list (the
direct worksheet ingredients, some of which may be sub-formulations) and a flat
CAS-level substance list (fully resolved raw materials with combined weight
fractions). This object gathers the recursively resolved ingredients
(inventories), the direct ingredient list (inventory_list), SDS
details, and the CAS-level substance rollup.
Show JSON schema:
{
"$defs": {
"CasLevelSubstance": {
"description": "A single CAS-level substance in an unpacked product's composition.",
"properties": {
"casPrimaryKeyId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Internal key identifying the CAS record for this substance.",
"title": "Casprimarykeyid"
},
"casID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS identifier for the substance (registry number or ``CAS...`` id).",
"title": "Casid"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Regulatory DB substance identifier for this CAS entry.\n\nPrefer this over ``cas_id`` when looking a substance up in the Regulatory DB\n(see [`SubstanceV4Collection`][albert.collections.substance_v4.SubstanceV4Collection]):\na single CAS number can map to more than one substance record, so the substance\nID is the precise key.",
"title": "Substanceid"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the ingredient this substance was unpacked from.",
"title": "Albertid"
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount of this substance in the unpacked composition.",
"title": "Amount"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum proportion of this substance in the unpacked composition.",
"title": "Min"
},
"target": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target proportion of this substance in the unpacked composition.",
"title": "Target"
},
"aggregatedFunc": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregated function values associated with this substance, when present.",
"title": "Aggregatedfunc"
}
},
"title": "CasLevelSubstance",
"type": "object"
},
"NormalizedCAS": {
"description": "A CAS entry with its normalized proportion in the unpacked product.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the CAS substance.",
"title": "Name"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The normalized amount of this CAS substance in the product.",
"title": "Value"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier for the CAS record.",
"title": "Albertid"
},
"smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string describing the substance's chemical structure.",
"title": "Smiles"
}
},
"title": "NormalizedCAS",
"type": "object"
},
"UnpackedCasInfo": {
"description": "CAS composition detail for an ingredient in an unpacked product.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier for the CAS record.",
"title": "Id"
},
"casID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS identifier for this row, when distinct from ``id`` (e.g. unknown CAS placeholders).",
"title": "Casid"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Regulatory DB substance identifier for this CAS entry.",
"title": "Substanceid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the CAS substance.",
"title": "Name"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum proportion of this substance in the ingredient.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The maximum proportion of this substance in the ingredient.",
"title": "Max"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS registry number (e.g. ``\"7732-18-5\"``).",
"title": "Number"
},
"casAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The averaged CAS proportion.",
"title": "Casavg"
},
"casMinAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The minimum averaged CAS proportion.",
"title": "Casminavg"
},
"casTargetAvg": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target averaged CAS proportion.",
"title": "Castargetavg"
},
"casSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed CAS proportion.",
"title": "Cassum"
},
"minSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed minimum CAS proportion.",
"title": "Minsum"
},
"targetSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed target CAS proportion.",
"title": "Targetsum"
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string for this CAS constituent.",
"title": "Cassmiles"
},
"aggregatedFunc": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Aggregated function values associated with this CAS constituent.",
"title": "Aggregatedfunc"
}
},
"title": "UnpackedCasInfo",
"type": "object"
},
"UnpackedInventory": {
"description": "A fully unpacked ingredient (inventory item) within a product.\n\nExtends [`UnpackedInventoryListItem`][albert.resources.product_design.UnpackedInventoryListItem] with the item's identity plus its\nresolved SDS information and CAS-level breakdown.",
"properties": {
"rowInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the item on this row.",
"title": "Rowinventoryid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount contributed by this entry.",
"title": "Value"
},
"functionValue": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Function values associated with this formula cell, when present.",
"title": "Functionvalue"
},
"colId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the formula column this entry belongs to.",
"title": "Colid"
},
"colInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID associated with the column.",
"title": "Colinventoryid"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the parent formula this entry was unpacked from.",
"title": "Parentid"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the row this entry belongs to.",
"title": "Rowid"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the ingredient (format ``INV...``).",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the ingredient.",
"title": "Name"
},
"rsnNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The RSN (registered substance) number for the ingredient.",
"title": "Rsnnumber"
},
"totalCasSum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The summed CAS proportion across the ingredient's constituents.",
"title": "Totalcassum"
},
"sdsInfo": {
"anyOf": [
{
"$ref": "#/$defs/UnpackedInventorySDS"
},
{
"type": "null"
}
],
"default": null,
"description": "The SDS / regulatory details for the ingredient."
},
"casInfo": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedCasInfo"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS-level composition breakdown for the ingredient.",
"title": "Casinfo"
},
"childCas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedCasInfo"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Child CAS rows for the ingredient, including unknown-CAS placeholders.",
"title": "Childcas"
}
},
"title": "UnpackedInventory",
"type": "object"
},
"UnpackedInventoryListItem": {
"description": "A single direct ingredient entry linking a formula cell to an item.\n\nRepresents one row/column position in the unpacked formula together with the\ninventory item at that position and its amount. Entries describe one level of\nthe formula only; an entry whose item is itself a formula is not expanded, so\nsumming entries does not give an ingredient's total amount across nested\nformulas.",
"properties": {
"rowInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the item on this row.",
"title": "Rowinventoryid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount contributed by this entry.",
"title": "Value"
},
"functionValue": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Function values associated with this formula cell, when present.",
"title": "Functionvalue"
},
"colId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the formula column this entry belongs to.",
"title": "Colid"
},
"colInventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID associated with the column.",
"title": "Colinventoryid"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the parent formula this entry was unpacked from.",
"title": "Parentid"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The identifier of the row this entry belongs to.",
"title": "Rowid"
}
},
"title": "UnpackedInventoryListItem",
"type": "object"
},
"UnpackedInventorySDS": {
"description": "Safety data sheet (SDS) and regulatory details for an unpacked ingredient.",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert identifier this SDS information belongs to.",
"title": "Albertid"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount associated with this SDS entry.",
"title": "Value"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SDS hazard classification.",
"title": "Class"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The UN number used for transport / regulatory classification.",
"title": "Unnumber"
}
},
"title": "UnpackedInventorySDS",
"type": "object"
}
},
"description": "The full unpacked composition of a single formulated product.\n\nReturned by\n[`get_unpacked_products`][albert.collections.product_design.ProductDesignCollection.get_unpacked_products],\none per formula that was unpacked. Unpacking recursively resolves the\nformulation's ingredient tree into two views: a row-level inventory list (the\ndirect worksheet ingredients, some of which may be sub-formulations) and a flat\nCAS-level substance list (fully resolved raw materials with combined weight\nfractions). This object gathers the recursively resolved ingredients\n(``inventories``), the direct ingredient list (``inventory_list``), SDS\ndetails, and the CAS-level substance rollup.",
"properties": {
"Inventories": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedInventory"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The fully unpacked ingredients making up the product, each with its SDS and CAS breakdown.\n\nNested formulas are resolved recursively, so each entry's ``value`` is that\ningredient's total amount in the product across every level. Use this list to\nanswer \"how much of ingredient X is in product Y\".",
"title": "Inventories"
},
"inventoryList": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedInventoryListItem"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The direct (one-level) ingredient entries by formula position.\n\nNot recursive: sub-formulations appear as single entries and are not expanded.\nFor an ingredient's total amount across nested formulas, read\n[`inventories`][albert.resources.product_design.UnpackedProductDesign.inventories].",
"title": "Inventorylist"
},
"inventorySDSList": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/UnpackedInventorySDS"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The SDS / regulatory details collected across the ingredients.",
"title": "Inventorysdslist"
},
"substances": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasLevelSubstance"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The formula's substance rows (CAS identifiers, amounts, and related fields).",
"title": "Substances"
},
"casLevelSubstances": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasLevelSubstance"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The product's composition expressed as individual CAS-level substances and their amounts.",
"title": "Caslevelsubstances"
},
"normalizedCasList": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/NormalizedCAS"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS substances with their normalized proportions in the product.\n\nProportions are adjusted for the purity of each ingredient's CAS constituents,\nso they can differ from the ingredient amounts in\n[`inventories`][albert.resources.product_design.UnpackedProductDesign.inventories].",
"title": "Normalizedcaslist"
}
},
"title": "UnpackedProductDesign",
"type": "object"
}
Fields:
-
inventories(list[UnpackedInventory] | None) -
inventory_list(list[UnpackedInventoryListItem] | None) -
inventory_sds_list(list[UnpackedInventorySDS] | None) -
substances(list[CasLevelSubstance] | None) -
cas_level_substances(list[CasLevelSubstance] | None) -
normalized_cas_list(list[NormalizedCAS] | None)
inventories
inventories: list[UnpackedInventory] | None = None
The fully unpacked ingredients making up the product, each with its SDS and CAS breakdown.
Nested formulas are resolved recursively, so each entry's value is that
ingredient's total amount in the product across every level. Use this list to
answer "how much of ingredient X is in product Y".
inventory_list
inventory_list: list[UnpackedInventoryListItem] | None = (
None
)
The direct (one-level) ingredient entries by formula position.
Not recursive: sub-formulations appear as single entries and are not expanded.
For an ingredient's total amount across nested formulas, read
inventories.
inventory_sds_list
inventory_sds_list: list[UnpackedInventorySDS] | None = None
The SDS / regulatory details collected across the ingredients.
substances
substances: list[CasLevelSubstance] | None = None
The formula's substance rows (CAS identifiers, amounts, and related fields).
cas_level_substances
cas_level_substances: list[CasLevelSubstance] | None = None
The product's composition expressed as individual CAS-level substances and their amounts.
normalized_cas_list
normalized_cas_list: list[NormalizedCAS] | None = None
The CAS substances with their normalized proportions in the product.
Proportions are adjusted for the purity of each ingredient's CAS constituents,
so they can differ from the ingredient amounts in
inventories.
ProductDesignSearchInventoryLine
Bases: BaseAlbertModel
A single ingredient row on a ProductDesignSearchItem.
Show JSON schema:
{
"description": "A single ingredient row on a [`ProductDesignSearchItem`][albert.resources.product_design.ProductDesignSearchItem].",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the ingredient (format ``INV...``).",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the ingredient.",
"title": "Name"
}
},
"title": "ProductDesignSearchInventoryLine",
"type": "object"
}
Fields:
-
id(InventoryId | None) -
name(str | None)
ProductDesignSearchTag
Bases: BaseAlbertModel
A tag attached to a formula hit on the product design grid.
Show JSON schema:
{
"description": "A tag attached to a formula hit on the product design grid.",
"properties": {
"tagId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Tag ID (format ``TAG...``).",
"title": "Tagid"
},
"tagName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the tag.",
"title": "Tagname"
}
},
"title": "ProductDesignSearchTag",
"type": "object"
}
Fields:
ProductDesignSearchItem
Bases: BaseAlbertModel
A lightweight formula hit returned by product design grid search.
Returned by
search,
this carries only summary fields for fast listing rather than the full
formula. To retrieve the complete formula, pass id to
get_by_id.
Show JSON schema:
{
"$defs": {
"ProductDesignSearchInventoryLine": {
"description": "A single ingredient row on a [`ProductDesignSearchItem`][albert.resources.product_design.ProductDesignSearchItem].",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the ingredient (format ``INV...``).",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the ingredient.",
"title": "Name"
}
},
"title": "ProductDesignSearchInventoryLine",
"type": "object"
},
"ProductDesignSearchTag": {
"description": "A tag attached to a formula hit on the product design grid.",
"properties": {
"tagId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Tag ID (format ``TAG...``).",
"title": "Tagid"
},
"tagName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the tag.",
"title": "Tagname"
}
},
"title": "ProductDesignSearchTag",
"type": "object"
}
},
"description": "A lightweight formula hit returned by product design grid search.\n\nReturned by\n[`search`][albert.collections.product_design.ProductDesignCollection.search],\nthis carries only summary fields for fast listing rather than the full\nformula. To retrieve the complete formula, pass ``id`` to\n[`get_by_id`][albert.collections.inventory.InventoryCollection.get_by_id].",
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID of the formula (format ``INV...``).",
"title": "Albertid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the formula.",
"title": "Name"
},
"inventory": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ProductDesignSearchInventoryLine"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The ingredient rows of the formula, when returned.",
"title": "Inventory"
},
"tags": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ProductDesignSearchTag"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The tags attached to the formula, when returned.",
"title": "Tags"
}
},
"title": "ProductDesignSearchItem",
"type": "object"
}
Fields:
-
id(InventoryId | None) -
name(str | None) -
inventory(list[ProductDesignSearchInventoryLine] | None) -
tags(list[ProductDesignSearchTag] | None)
inventory
inventory: list[ProductDesignSearchInventoryLine] | None = (
None
)
The ingredient rows of the formula, when returned.
tags
tags: list[ProductDesignSearchTag] | None = None
The tags attached to the formula, when returned.