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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e30a51c96d4bf91dff1733c93c7a4ecf8bf822fe516e9afb3df45dbb2cf14c8b
|
|
| MD5 |
564e496f28843f88785da9935cd45e35
|
|
| BLAKE2b-256 |
bc8bbdeee2298a5f57654da17e1fd71953a0667b1c4c2e8d249a7037be4b2abd
|
Provenance
The following attestation bundles were made for glyff_pydantic-0.16.0.tar.gz:
Publisher:
publish-glyff-pydantic.yml on nueruyu/glyff
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glyff_pydantic-0.16.0.tar.gz -
Subject digest:
e30a51c96d4bf91dff1733c93c7a4ecf8bf822fe516e9afb3df45dbb2cf14c8b - Sigstore transparency entry: 2473406150
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@aa140cf63935ffe2452e07750407ddb31380810c -
Branch / Tag:
refs/tags/v0.16.0 - Owner: https://github.com/nueruyu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-glyff-pydantic.yml@aa140cf63935ffe2452e07750407ddb31380810c -
Trigger Event:
push
-
Statement type:
File details
Details for the file glyff_pydantic-0.16.0-py3-none-any.whl.
File metadata
- Download URL: glyff_pydantic-0.16.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb374a193de3aa09365fcaa1a2f1a3876a375ff51c7c49d76eec88d1833f59e0
|
|
| MD5 |
ea201dff391f2715d44478a38ed5dc3a
|
|
| BLAKE2b-256 |
dae5368cf18cf44d08f3357f498570be900627e0d73e767d670a3fe3a748be7b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glyff_pydantic-0.16.0-py3-none-any.whl -
Subject digest:
bb374a193de3aa09365fcaa1a2f1a3876a375ff51c7c49d76eec88d1833f59e0 - Sigstore transparency entry: 2473406164
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@aa140cf63935ffe2452e07750407ddb31380810c -
Branch / Tag:
refs/tags/v0.16.0 - Owner: https://github.com/nueruyu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-glyff-pydantic.yml@aa140cf63935ffe2452e07750407ddb31380810c -
Trigger Event:
push
-
Statement type: