unitelabs.labware.math.decimal
Attributes
- Name
Number
- Type
- Value
= typing.Union[str, int, float, tuple[int, collections.abc.Sequence[int], int], decimal.Decimal]
- Description
Functions
is_number(value : typing.Any) -> bool
Check whether a value is of numeric type.
Parameters
- Name
value
- Type
- typing.Any
- Default
- Description
The number to check.
Response
- Type
- bool
- Description
Classes
Decimal
Decimal number for fast correctly rounded decimal floating point arithmetic.
Methods
__set_name__(self, owner : type[object], name : str) -> None
Parameters
- Name
self
- Type
- Default
- Description
- Name
owner
- Type
- type[object]
- Default
- Description
- Name
name
- Type
- str
- Default
- Description
__get__(self, instance : typing.Optional[object], owner : typing.Optional[type[object]]) -> decimal.Decimal
Parameters
- Name
self
- Type
- Default
- Description
- Name
instance
- Type
- typing.Optional[object]
- Default
- Description
- Name
owner
- Type
- typing.Optional[type[object]]
- Default
- Description
Response
- Type
- decimal.Decimal
- Description
Attributes
- Name
_default_value
- Type
- Value
= default
- Description
- Name
_attr_name
- Type
- Value
= ''
- Description
DecimalField
- Bases
- marshmallow.fields.Field
Methods
_serialize(
- self,
- value : typing.Any,
- attr : typing.Optional[str],
- obj : typing.Any,
- **kwargs
Parameters
- Name
self
- Type
- Default
- Description
- Name
value
- Type
- typing.Any
- Default
- Description
- Name
attr
- Type
- typing.Optional[str]
- Default
- Description
- Name
obj
- Type
- typing.Any
- Default
- Description
- Name
**kwargs
- Type
- Default
- = {}
- Description
_deserialize(
- self,
- value : typing.Any,
- attr : typing.Optional[str],
- data : typing.Optional[typing.Mapping[str, typing.Any]],
- **kwargs
Parameters
- Name
self
- Type
- Default
- Description
- Name
value
- Type
- typing.Any
- Default
- Description
- Name
attr
- Type
- typing.Optional[str]
- Default
- Description
- Name
data
- Type
- typing.Optional[typing.Mapping[str, typing.Any]]
- Default
- Description
- Name
**kwargs
- Type
- Default
- = {}
- Description