Skip to content

Quantity

Quantity encapsulates numeric quantities encountered in tables or annotations, such as required part counts or batch sizes. The model stores the value, units, context, and any qualifiers, giving you a reliable data point for planning. It also records the source reference, enabling traceability to the BOM or note that supplied the quantity. Beyond a simple number, the object captures confidence values, detected tolerances, and language cues so you can judge how dependable an extraction is before committing inventory. This rich metadata is particularly useful for procurement automation, inventory reconciliation, or generating pick lists directly from drawings. Use the Quantity object to ensure every callout that impacts ordering or scheduling is accounted for without manually scanning each table.

Bases: BaseModel

Represents a Physical Quantity with a value and a unit.

PARAMETER DESCRIPTION
value

The value of the quantity.

TYPE: Decimal

unit

The unit of the quantity.

TYPE: str

Source code in werk24/models/v2/models.py
class Quantity(BaseModel):
    """
    Represents a Physical Quantity with a value and a unit.
    """

    value: Decimal = Field(
        ...,
        description="The value of the quantity.",
        examples=[Decimal("10.5")],
        allow_inf_nan=True,  # Allowing inf for "R PLANE"
    )
    unit: str = Field(
        ...,
        description="The unit of the quantity.",
        examples=["mm"],
    )