Changelog
0.2.0 — 2026-05-08
Added
ExternalField[T]— generic pass-through descriptor for non-decimal values inside aRecord(UUIDs, strings, enums, plain ints, …).field_typeparameter with runtime type-checking on assignment.default_factory: Callable[[], T]for per-instance mutable defaults (e.g.uuid.uuid4).json_encoder/json_decoderwired throughto_json()/from_json().- Blocked inside
serializable=Truerecords. - Exported from the top-level
fixfieldpackage.
FieldTemplate— reusableFieldpreset callable.- Built-in field templates:
CurrencyField,PercentField,QuantityField,RateField,AccountNumberField. to_json()/from_json()onRecord.signedparameter onField/FieldTemplate— rejects negative values.serializable=Trueclass flag — validates all fields at class-definition time.
Fixed
to_json()raisedKeyErrorwhen a nestedRecordFieldcontained fields not present in the outer record.ExternalField.__get__incorrectly treated an explicitly-setNoneas “not set”, triggeringdefault_factoryagain.
Examples
examples/banking/end-to-end demo updated to useExternalFieldforTransaction.tx_id(UUID) andmemo(str).
0.1.0 — 2026-05-07
Initial release.
FixedDecimalscalar with per-instance precision, rounding, and overflow protection.Fielddescriptor withplaces,rounding,default,digits,signed.Recordbase class with auto-generated__init__,__repr__,__eq__.RecordField[T]for nested records.to_string()/from_string()for fixed-width flat-file serialisation.RoundingStrategyenum with 8 modes includingROUND_HALF_ODD.FieldOverflowErrorfor integer-digit cap violations.