glyff
Guaranteed Lightweight Yieldable Function Foundation.
A primitive for pausing async functions across process and request boundaries, and resuming them later from the same point.
Install
pip install glyff
glyff has no dependencies beyond the Python standard library.
Behavior
- Marked function calls are recorded in a session-scoped execution repository, keyed by function identity, arguments, and an ordinal among identical calls.
- Re-invoking the same completed call within the same session returns the recorded result instead of re-executing.
- An exception persists nothing: the interrupted call stays
STARTED(retried on resume), completed descendant work remains committed, and the original exception propagates. - To pause a session intentionally, raise an application-owned exception and
catch it outside the
Sessionblock.
Public API
| Name | Description |
|---|---|
Domain |
Versioned ownership boundary; its engrave marks a function. |
Session |
Async context manager that scopes a sequence of engraved calls. |
ExecutionId |
Identifier for a recorded function execution. |
DomainId |
A domain's persistent machine identifier. |
ExecutionName |
The recorded name of an engraved function. |
ArgumentsDigest |
Digest of a call's canonical arguments. |
Execution |
Aggregate Root for a recorded function execution. |
ExecutionStatus |
Enum: STARTED, COMPLETED. |
SerializedValue |
Serializer-neutral persisted value (results, metadata). |
CanonicalArguments |
A call's encoded canonical arguments, the preimage of its key. |
CanonicalArgumentValue |
A logical canonical value, including a fallback. |
CanonicalFallback |
A fallback representation in a canonical argument. |
Metadata |
Metadata entry owned by an Execution. |
ExecutionRepository |
Repository for execution aggregates. |
Transaction |
Active transaction boundary. |
TransactionProvider |
Provider used by TransactionScope. |
Serializer |
Protocol for value serialization. |
ArgumentCanonicalizer |
Contract for normalizing bound call arguments into a canonical form. |
CanonicalValue |
A value in the JSON data model. |
SessionId |
The name a session's records are stored under. |
glyff.migration carries the offline half: MigratableBackend and
SessionMigration for a store that can replace a session atomically,
SessionMigrator for what a session should become, and DomainMigration —
declared as the ExecutionShape pairs that changed shape — as the one glyff
ships.
See migration.
Every engraved function belongs to a domain, which owns and versions its records:
engrave = glyff.Domain("com.example.payments", version="3").engrave
The first call into a domain records that version for the session, and a later
call under a different one raises DomainVersionMismatchError rather than
migrating. See
migration.
Persistent boundaries should declare an identity such as
@engrave(name="chat.reply"), so Python function renames do not change recorded
keys. Without name, glyff derives it from the function's module and
__qualname__.
Extending
- For persistent storage, see
glyff-sqlite(production) andglyff-file-store(debug). - For Pydantic-typed serialization, see
glyff-pydantic. - Custom backends provide an
ExecutionRepository, aTransactionProviderandclaim_domain, usually through a small backend bundle. See the backends doc. glyff.testingcarries a conformance suite for each extension point, listed in the backends doc (planned: #36).
Status
Pre-1.0 — the API is unstable and will change. See the documentation for the guarantees and what is planned.
License
MIT
Metadata
Release files for glyff 0.16.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glyff-0.16.0.tar.gz | 74.1 kB | With provenance | Details for glyff-0.16.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| glyff-0.16.0-py3-none-any.whl | Python 3 | none | any | Details for glyff-0.16.0-py3-none-any.whl |
Total release size: 138.9 kB
Release files / glyff-0.16.0.tar.gz
| Download URL | glyff-0.16.0.tar.gz |
|---|---|
| Size | 74.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54fde7a80a7489b5e2d36e96e4340c9fb48bd1b044ddb593b96e74c3ae22167e
|
|
BLAKE2b-256 checksum How to use checksums |
4efd4461f2e7682242dc03fb65be17003a37b44d5487509ca6f9c2acb5ceb9cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / glyff-0.16.0-py3-none-any.whl
| Download URL | glyff-0.16.0-py3-none-any.whl |
|---|---|
| Size | 64.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b46e5901ec1dbc4275be822c67beb247970d9f1de1624b7771f8b1f674a53ff8
|
|
BLAKE2b-256 checksum How to use checksums |
b67a7ee88abed17418b439ccceb38038a0d3f83821d921ccd41b38e76cf68926
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logSecurity for glyff 0.16.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for glyff-0.16.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.