condecimal
A wrapper around Decimal that adds validation.
def condecimal(
strict: bool | None = None,
gt: int | Decimal | None = None,
ge: int | Decimal | None = None,
lt: int | Decimal | None = None,
le: int | Decimal | None = None,
multiple_of: int | Decimal | None = None,
max_digits: int | None = None,
decimal_places: int | None = None,
allow_inf_nan: bool | None = None
) - > type[Decimal]
A wrapper around Decimal that adds validation.
Parameters
| Name | Type | Description |
|---|---|---|
| strict | `bool | None` = None |
| gt | `int | Decimal |
| ge | `int | Decimal |
| lt | `int | Decimal |
| le | `int | Decimal |
| multiple_of | `int | Decimal |
| max_digits | `int | None` = None |
| decimal_places | `int | None` = None |
| allow_inf_nan | `bool | None` = None |
Returns
| Type | Description |
|---|---|
type[Decimal] | A Decimal type with validation constraints applied via metadata. |