Skip to content

BillOfMaterialRow

BillOfMaterialRow represents a single line item in a bill of materials that was interpreted from the engineering drawing. The model stores the index of the entry, quantity required, textual description, and any linked identifiers so you can reliably map a callout to the physical part it references. It also captures optional metadata, such as material, supplier, and remarks columns, to preserve the full context of the original table. With this structured record you can rebuild the BOM programmatically, compare it against enterprise resource planning data, or feed it into procurement workflows. Use each row to validate that all components are accounted for, highlight revisions between drawing versions, and automate change notifications when the documented composition of an assembly evolves.

Bases: BaseModel

Represents a single row in a bill of material (BOM) table.

PARAMETER DESCRIPTION
position

Position Number of the part on the assembly, defined using position bubbles.

TYPE: str | None DEFAULT: None

part_number

Part Number of the parts listed in the bill of material.

TYPE: str | None DEFAULT: None

designation

Designation/Title of the part listed in the bill of material.

TYPE: str | None DEFAULT: None

material_options

List of possible MaterialCombinations

TYPE: list[MaterialCombination] DEFAULT: <dynamic>

quantity

Physical quantity in the string format of Pint.

TYPE: Quantity | None DEFAULT: None

unit_weight

Unit Weight of the parts listed in the bill of material.

TYPE: Quantity | None DEFAULT: None

Source code in werk24/models/v2/models.py
class BillOfMaterialRow(BaseModel):
    """
    Represents a single row in a bill of material (BOM) table.
    """

    model_config = ConfigDict(arbitrary_types_allowed=True)

    position: Optional[str] = Field(
        None,
        description="Position Number of the part on the assembly, defined using position bubbles.",
    )
    part_number: Optional[str] = Field(
        None,
        description="Part Number of the parts listed in the bill of material.",
    )
    designation: Optional[str] = Field(
        None,
        description="Designation/Title of the part listed in the bill of material.",
    )
    material_options: list[MaterialCombination] = Field(
        default_factory=list,
        description="List of possible MaterialCombinations",
    )
    quantity: Optional[Quantity] = Field(
        None, description="Physical quantity in the string format of Pint."
    )
    unit_weight: Optional[Quantity] = Field(
        None, description="Unit Weight of the parts listed in the bill of material."
    )