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.16.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.16.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: glyff_pydantic-0.16.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.16.0.tar.gz
Algorithm Hash digest
SHA256 e30a51c96d4bf91dff1733c93c7a4ecf8bf822fe516e9afb3df45dbb2cf14c8b
MD5 564e496f28843f88785da9935cd45e35
BLAKE2b-256 bc8bbdeee2298a5f57654da17e1fd71953a0667b1c4c2e8d249a7037be4b2abd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for glyff_pydantic-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb374a193de3aa09365fcaa1a2f1a3876a375ff51c7c49d76eec88d1833f59e0
MD5 ea201dff391f2715d44478a38ed5dc3a
BLAKE2b-256 dae5368cf18cf44d08f3357f498570be900627e0d73e767d670a3fe3a748be7b

See more details on using hashes here.

Provenance

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

This release

0.16.0 This release

2 files

0.15.0

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