glyff-file-store
File-backed ExecutionRepository implementation for
glyff.
This is the human-readable debug backend: JsonFileBackend bundles a
file-backed execution repository and transaction provider, storing executions
in a single pretty-printed JSON map that is rewritten atomically on each
commit.
For the durable production backend, see
glyff-sqlite.
Install
pip install glyff-file-store
This package depends on glyff>=0.14.0 and filelock>=3.15.
Public API
| Name | Description |
|---|---|
JsonFileBackend |
Bundle exposing the store's collaborators. |
FileExecutionRepository |
Debug repository writing pretty-printed JSON. |
FileTransactionProvider |
Transaction provider for the file backend. |
Construct it with a base_dir; it holds every session written under it:
from glyff_file_store import JsonFileBackend
backend = JsonFileBackend(base_dir=".sessions")
The underlying FileClient is internal and not part of the public API.
JSON debug format
Everything the store holds lives in one pretty-printed, key-sorted document at
<base_dir>/glyff.json, nested by session id:
{
"format_version": 1,
"sessions": {
"orders": {
"domain_versions": {
"com.example.payments": "3"
},
"executions": {}
}
}
}
format_version is glyff's own, so a store written by an incompatible build is
refused rather than misread; domain_versions holds one version per domain the
session has entered, each claimed by whichever process entered it first.
Execution results and metadata are stored as embedded JSON values, so serializers used with this backend must produce JSON text. Canonical arguments are stored as a JSON string instead: the execution's key is the digest of those exact bytes, so they are kept verbatim rather than re-encoded.
The whole document is read on access and rewritten on every commit, which is what keeps it readable and what makes it unsuitable for high-throughput or large-scale use.
Commit atomicity
A commit reads the document, applies the transaction's staged updates, and
replaces the file in one os.replace, so it is all-or-nothing however many
sessions it touched. A crash can only strand a temporary beside the document,
never leave the document itself half-written; the next open clears it.
Concurrency
Commits and version claims are serialized across the processes sharing a
base_dir, through a .glyff.lock file beside the document. Reads take no
lock: a replacement is atomic, so a read sees either the whole old document or
the whole new one.
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_file_store-0.14.0.tar.gz.
File metadata
- Download URL: glyff_file_store-0.14.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
926a51200dd9e078129f943a74d01987e798f5b5e6c9ba7451cdade497f5607c
|
|
| MD5 |
01dfbbe7bd8868ac61305d8be716d4bd
|
|
| BLAKE2b-256 |
9e8e66eaf7761083a4bbef57cd618c2637cded86ebbbfe301d64c2d6a649bdc3
|
Provenance
The following attestation bundles were made for glyff_file_store-0.14.0.tar.gz:
Publisher:
publish-glyff-file-store.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_file_store-0.14.0.tar.gz -
Subject digest:
926a51200dd9e078129f943a74d01987e798f5b5e6c9ba7451cdade497f5607c - Sigstore transparency entry: 2450038522
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@3e083fd79982abe3de8d09f0e36d8e82e005b45e -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/nueruyu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-glyff-file-store.yml@3e083fd79982abe3de8d09f0e36d8e82e005b45e -
Trigger Event:
push
-
Statement type:
File details
Details for the file glyff_file_store-0.14.0-py3-none-any.whl.
File metadata
- Download URL: glyff_file_store-0.14.0-py3-none-any.whl
- Upload date:
- Size: 10.5 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 |
8e1ff3da77b6e2dcc3900d01323ec11d92ee5dc853c2877c071ff9c2c9020ff9
|
|
| MD5 |
f1eabc7525268587b1488254ada8ed41
|
|
| BLAKE2b-256 |
140088351d9de8255d195ee69cbba01df8a60c590c790e3b9820f2ba6c07c012
|
Provenance
The following attestation bundles were made for glyff_file_store-0.14.0-py3-none-any.whl:
Publisher:
publish-glyff-file-store.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_file_store-0.14.0-py3-none-any.whl -
Subject digest:
8e1ff3da77b6e2dcc3900d01323ec11d92ee5dc853c2877c071ff9c2c9020ff9 - Sigstore transparency entry: 2450038530
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@3e083fd79982abe3de8d09f0e36d8e82e005b45e -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/nueruyu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-glyff-file-store.yml@3e083fd79982abe3de8d09f0e36d8e82e005b45e -
Trigger Event:
push
-
Statement type: