Skip to main content

Guaranteed Lightweight Yieldable Function Foundation for checkpointed and resumable task execution.

Project description

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 store, keyed by function identity, arguments, and call position.
  • Re-invoking the same completed call within the same session returns the recorded result instead of re-executing.
  • Exceptions raised by a call are non-terminal by default: completed work is committed, the interrupted call remains STARTED, and the original exception propagates so the caller can decide whether to resume later.
  • To pause a session intentionally, raise an application-owned exception and catch it outside the Session block.

Public API

Name Description
engrave Decorator that marks an async function for recording.
Session Async context manager that scopes a sequence of engraved calls.
ExecutionId Identifier for a recorded function execution.
ExecutionRecord Persisted execution state and result.
ExecutionStatus Enum: STARTED, COMPLETED, FAILED.
SessionStore Protocol for storage backends.
Serializer Protocol for value serialization.
ArgsHasher Protocol for argument hashing.

Extending

  • For persistent storage, see glyff-file-store.
  • For Pydantic-typed serialization, see glyff-pydantic.
  • Custom backends can be written by implementing the SessionStore, Serializer, and ArgsHasher protocols.

Status

Early development. APIs may change before v1.0.

License

MIT

Project details


Download files

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

Source Distribution

glyff-0.12.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

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

glyff-0.12.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file glyff-0.12.0.tar.gz.

File metadata

  • Download URL: glyff-0.12.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for glyff-0.12.0.tar.gz
Algorithm Hash digest
SHA256 0b05b28b79df0ce42feaf5a68fdc71bdd7dd4a4cda3ff2768e1a3256a0d3e918
MD5 d71f6fec985f629b9f952e27735ef21e
BLAKE2b-256 1d0b468b44c3fc4c213f33b7b555cb8d91916a868ad6a426cf65fe67e681bf7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for glyff-0.12.0.tar.gz:

Publisher: publish-glyff.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-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: glyff-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for glyff-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0f2584357c6ad463032e9d65b54d8d02e3a3c221f94078c7c8e1ec0ed37ba11
MD5 285c2f9e0b5b503de40b4cfb10653500
BLAKE2b-256 2d2654ad8f778dd4c5a47312d283f470b0d6121d425a05b4c24ff87c7aeeffcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for glyff-0.12.0-py3-none-any.whl:

Publisher: publish-glyff.yml on nueruyu/glyff

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page