Changelog

0.4.0 (2025-12-23)

Changed

  • Handlers now take a single context argument (StructurerContext or UnstructurerContext) which contain the structurer and the target type. (PR_20)

  • Support any Sequence type instead of just a list when structuring into a struct-like. Consequently, the handlers had list changed to sequence. (PR_22)

  • Support any Mapping type or MappingProxyType instead of just a dict when structuring into a struct-like. Consequently, the handlers had Dict changed to Mapping. (PR_22)

  • Uniformized structurer/unstructurers. Now they are all classes based on StructureHandler/UnstructureHandler. simple_structurer, simple_unstructurer removed. (PR_23)

  • simple_typechecked_unstructurer removed, now Unstructurer.unstructure_as performs the typecheck. (PR_23)

  • Skip final default values when unstructuring from a struct-like into a sequence. (PR_23)

  • Added StructLikeOptions to tune behavior for struct-like types. (PR_23)

Added

  • Support for default factory in dataclasses. (PR_21)

  • Support for NamedTuple types. (PR_21)

  • Support for user context passing. (PR_24)

Fixed

  • Resolve type hints in dataclasses if they are given as strings. (PR_20)

0.3.0 (2024-03-15)

Changed

  • Renamed “handlers” and “predicate handlers” to “lookup handlers” and “sequential handlers”. (PR_15)

Added

  • Skip fields equal to the defaults when unstructuring dataclasses. (PR_13)

  • Generator-based deferring to lower level structuring and unstructuring. (PR_13)

  • Support for NewType chains. (PR_15)

  • simple_typechecked_unstructure() decorator. (PR_17)

0.2.1 (2024-03-05)

Fixed

  • The metadata type in the name converter parameter of StructureDictIntoDataclass and UnstructureDataclassToDict set to the correct MappingProxyType. (PR_1)

0.2.0 (2024-03-05)

Changed

  • Minimum Python version bumped to 3.10.

0.1.0 (2024-03-04)

Initial version.