Skip to main content

glyff-pydantic

Pydantic-based Serializer and ArgumentCanonicalizer implementations for glyff.

Lets a glyff session record results of any type Pydantic's TypeAdapter can handle, and key executions on arguments that are Pydantic models.

Install

pip install glyff-pydantic

This package depends on glyff>=0.14.0 and pydantic>=2.0.

Public API

Name Description
PydanticSerializer Serializes values to JSON using TypeAdapter. Restores typed values on read.
PydanticArgumentCanonicalizer Canonicalizes function arguments through Pydantic's own dump, for stable, type-aware identity.

PydanticSerializer works with any type TypeAdapter handles. The canonicalizer's reach is narrower by design: it dumps BaseModel instances and represents the scalars pydantic knows (datetime, UUID, Decimal), while every container is walked by glyff's shared canonicalization so mappings, sets and fallback representations follow one set of rules.

Both satisfy the contracts in glyff.testing; what they inherit from the stdlib JSON implementations is proved in glyff, and this package's own tests cover what Pydantic changes.

Canonical arguments are part of an execution's identity, so they must stay stable across code changes — see execution identity for what the canonicalizer may and may not see.

Status

Pre-1.0 — the API is unstable and will change.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glyff_pydantic-0.14.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glyff_pydantic-0.14.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file glyff_pydantic-0.14.0.tar.gz.

File metadata

  • Download URL: glyff_pydantic-0.14.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for glyff_pydantic-0.14.0.tar.gz
Algorithm Hash digest
SHA256 0e5d0a65634dfa2f1241c038b3b942f29f5b44629c7734ecefef6b37e9b6dbff
MD5 0b2a0d149e991848f43accdb3597ed6e
BLAKE2b-256 c04307a016a97da78f22346b0df4d229ee5316cb0692b1457e7997160fa2b3c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for glyff_pydantic-0.14.0.tar.gz:

Publisher: publish-glyff-pydantic.yml on nueruyu/glyff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glyff_pydantic-0.14.0-py3-none-any.whl.

File metadata

File hashes

Hashes for glyff_pydantic-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66138b7e601253dcba4493bc086fd6820d0959c3ffdab9ec8be0e46115f0646f
MD5 d3effc57f3e57ef0040fb48565d3c7ae
BLAKE2b-256 613658e2cbeb6ac72c39dfa255a86f70ff622af9b91ea4a8de29d8e88095b113

See more details on using hashes here.

Provenance

The following attestation bundles were made for glyff_pydantic-0.14.0-py3-none-any.whl:

Publisher: publish-glyff-pydantic.yml on nueruyu/glyff

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.16.0

2 files

0.15.0

2 files

This release

0.14.0 This release

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page