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.15.0.tar.gz (7.9 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.15.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: glyff_pydantic-0.15.0.tar.gz
  • Upload date:
  • Size: 7.9 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.15.0.tar.gz
Algorithm Hash digest
SHA256 e151e60fe45eb826118d60db62a178e2bc6280c52dd5ccb91b93c642694a438b
MD5 6198fc56c9d2c482906b7e4f318cbf80
BLAKE2b-256 998209770f9d8d6809a9501d1b6dc73e52e0988c0db2260608ce217e97eaa19c

See more details on using hashes here.

Provenance

The following attestation bundles were made for glyff_pydantic-0.15.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.15.0-py3-none-any.whl.

File metadata

File hashes

Hashes for glyff_pydantic-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47f8708c7deba315901e3f7f842e762c070cf5205d3f4dfd0b89ebe060272e41
MD5 7279ed2bf1d8c230aef6f22dcabbfbb8
BLAKE2b-256 fd3aa1d91e2fadca23e4d51ffe02dead636f4d73254bb55ce925590aa3082785

See more details on using hashes here.

Provenance

The following attestation bundles were made for glyff_pydantic-0.15.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

This release

0.15.0 This release

2 files

0.14.0

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