Skip to content

amsdal_utils

v0.7.3 - 2026-06-15

Added

  • Decimal core type support: new CoreTypes.DECIMAL member, with CoreTypes.from_python_type(Decimal) and CoreTypes.to_python_type(CoreTypes.DECIMAL) mapping to Python's decimal.Decimal. AmsdalGenerateJsonSchema.decimal_schema now emits {"type": "decimal", "precision": <max_digits>, "scale": <decimal_places>} instead of Pydantic's default decimal JSON schema.

v0.7.2 - 2026-06-08

Fixed

  • TypeData.items now resolves deterministically via a callable Discriminator instead of a non-discriminated Union. Legacy dictionary schemas ({"key_type": ..., "value_type": ...}) reliably parse as LegacyDictSchema and modern schemas ({"key": ..., "value": ...}) as DictSchema, regardless of Pydantic smart-union scoring. Fixes Unknown dictionary type: "TypeData" model-build failures under Pydantic >= 2.13 (the legacy shape previously resolved to a bare TypeData).

v0.7.1 - 2026-06-03

Fixed

  • _safe_deep_copy (event context snapshotting) now reads a model's foreign-key fields (__foreign_keys__) from __dict__ instead of via getattr. In async mode FK access returns an un-awaited coroutine (lazy reference loading), which the previous getattr-based copy captured and leaked into the snapshot. Plain Pydantic models without __foreign_keys__ are unaffected.

v0.7.0 - 2026-05-29

Added

  • Async metadata info query support: AsyncMetadataInfoQueryBase plus MetadataInfoManager.register_async_metadata_info_query, get_async_metadata_info_query, aget_reference_to, and aget_referenced_by. Added AsyncLazyInstanceObject — an async mirror of LazyInstanceObject that caches the awaited value on first await.

Changed

  • Metadata.reference_to and Metadata.referenced_by now return an awaitable list[Reference] when async_mode is enabled, and a plain list[Reference] otherwise. The sync MetadataInfoManager query methods (register_metadata_info_query, get_metadata_info_query, get_reference_to, get_referenced_by) are now restricted to sync mode via @sync_mode_only, and the new async counterparts to async mode via @async_mode_only.

v0.6.3 - 2026-05-20

Added

  • LayeredContext[T] primitive in amsdal_utils.contexts — stack-with-default ContextVar holder used by AMSDAL layers (data, models, framework) for layered context state with top-of-stack ▶ process-global default ▶ raise resolution.
  • New ReferenceableModelBase separating the reference / metadata / query contract from the plain Pydantic root ModelBase. Value-objects extend ModelBase; persisted entities extend ReferenceableModelBase.

Changed

  • Reference.ref now uses validation_alias='$ref' + serialization_alias='ref' (replacing the prior alias='$ref' plus a model_dump override). Serialization emits ref regardless of by_alias, so both model_dump and model_dump_json agree with the long-standing public contract {'ref': {...}}.

v0.6.2 - 2026-04-30

Added

  • Hoisted object_id_segments() and normalize_object_id_to_scalar() helpers onto Address/Reference for canonical scalar-or-list to list-of-PK-segments handling.

v0.6.1 - 2026-03-19

Added

  • New TransactionType class

v0.6.0 - 2026-01-27

Added

  • The events system, replacement for the lifecycle.

v0.5.8 - 2025-12-22

Added

  • Added support for python 3.13

v0.5.7 - 2025-12-21

Changed

  • Updated pydantic version

v0.5.6 - 2024-11-05

Fixed

  • Fixed for additionalProperties handling in schemas with references

v0.5.5 - 2024-10-20

Added

  • External connection config

v0.5.4 - 2024-07-11

Added

  • config_dir added to AmsdalConfig

v0.5.3 - 2024-06-17

Changed

  • Update package manager to uv for better performance and compatibility.

v0.5.2 - 2024-05-30

Fixed

  • Fix for optional nested lists in dict types

v0.5.1 - 2024-05-30

Fixed

  • Fix for nested lists in dict types

v0.5.0 - 2024-05-19

Added

  • Storage metadata. Support multi-types via | separator

v0.4.5 - 2024-05-16

Added

  • Added support for optional References in models

v0.4.4 - 2024-05-06

Changed

  • Handle required fields if nullable

v0.4.3 - 2024-04-17

Changed

  • AmsdalGenerateJsonSchema for correct enums name retrieval

v0.4.2 - 2024-04-10

Changed

  • options moved to the TypeData level

v0.4.1 - 2024-03-05

Added

  • db_field added to PropertyData

v0.4.0 - 2024-02-24

Added

  • Adjustments for the Python classes and FKs

v0.3.2 - 2024-12-13

Added

  • async_mode_only and sync_mode_only decorators (mode-decorators)

v0.3.1 - 2024-12-04

Added

  • Async support (async-support)

v0.3.0 - 2024-11-26

Added

  • Python3.12 support added (python3.12-support)

Changed

  • Metadata redesign: moving metadata into historical connection (metadata-redesign)

v0.2.0 - 2024-10-14

Added

  • Adjustments for AMSDAL Glue (amsdal-glue)

v0.1.4 - 2024-09-12

Added

  • Added google style docstring (docstring)

v0.1.3 - 2024-09-04

Added

  • Update amsdal config: worker resource added (worker-resource)

v0.1.2 - 2024-04-19

Changed

  • Add field_id and is_deleted fields to TableColumnSchema (add-field-id-and-is-deleted-fields-to-table-column-schema)

v0.1.1 - 2024-03-21

Changed

  • Change version pins to compatible releases (change-version-pins-to-compatible-releases)

v0.1.0 - 2024-03-20

Changed

  • Adapt utils to new version of amsdal (adapt-utils-to-new-version-of-amsdal)