piel.types.quantity#

Classes#

Quantity

A base model class that serves as the foundation for other measurement in the project.

Module Contents#

class Quantity(/, **data: Any)[source]#

Bases: piel.types.symbolic.SymbolicValue

A base model class that serves as the foundation for other measurement in the project. This class extends pydantic’s BaseModel and includes additional configuration settings for strict validation and immutability.

Config#

A nested class to configure the behavior of the model. arbitrary_types_allowed (bool): Allows arbitrary measurement. extra (str): Forbids extra attributes not defined in the model. validate_assignment (bool): Validates fields on assignment. strict (bool): Enforces strict type validation. allow_mutation (bool): Prevents mutation of the model’s fields.

supplied_parameters() list[str]#

Returns a list of parameter names that have been supplied (i.e., are not None).

name: str = ''#
value: piel.types.core.NumericalTypes | None = None#
unit: piel.types.units.Unit#
__add__#
__mul__#
__sub__#
__radd__#
__rmul__#
__rsub__#
__truediv__#
__rtruediv__#
__iadd__#
__imul__#
__isub__#