File-based SessionStore implementation for glyff.
Project description
glyff-file-store
File-backed ExecutionRepository implementation for
glyff.
This package provides a human-readable debug backend:
JsonFileBackendprovides a file-backed execution repository and transaction provider. It stores executions in a single pretty-printed JSON map and rewrites that file atomically on each commit.
For the durable production backend, see
glyff-sqlite.
Install
pip install glyff-file-store
This package depends on glyff>=0.1.0.
Public API
| Name | Description |
|---|---|
JsonFileBackend |
Bundle exposing repository and transaction provider. |
FileExecutionRepository |
Debug repository writing pretty-printed JSON. |
FileTransactionProvider |
Transaction provider for the file backend. |
Construct it with a base_dir and session_id:
from glyff_file_store import JsonFileBackend
backend = JsonFileBackend(base_dir=".sessions", session_id="my-session")
The underlying FileClient is internal and not part of the public API.
JSON debug format
JsonFileBackend stores each session under <base_dir>/<session_id>/ in a
single pretty-printed JSON file (executions.json). The execution map is read
from that file on access and rewritten atomically on every commit.
Execution results and metadata are stored as embedded JSON values, so
serializers used with this backend must produce JSON text.
This format is intended for debugging and manual inspection, not as the durable or high-throughput backend.
Commit atomicity
The store commits the staged ops for an entire session directory as a unit.
Each commit builds the full new session state in a sibling .commit-*
directory and then swaps it into place using directory renames. All staged ops
are visible together or none are, regardless of how many files were touched,
and a writer callback raising mid-commit leaves the on-disk session unchanged.
If a process dies mid-commit, the next time the session directory is opened it
is restored from session.bak when the live directory is missing, or the stale
backup is removed when the live directory is already in place. Any orphan
.commit-* temp directories are also removed.
Status
Early development. APIs may change before v1.0.
License
MIT
Project details
Release history Release notifications | RSS feed
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.13.0.tar.gz.
File metadata
- Download URL: glyff_file_store-0.13.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a60d3b7415264a65c989ddcbb83ae3981c04f959f93b08b84ea7b3191beb11fb
|
|
| MD5 |
144c3920a2112fbac26bc983d155e917
|
|
| BLAKE2b-256 |
e09492ada31320d56ca611f0a4e921f7cae94c86e8e6b017e505ba184a1ec883
|
Provenance
The following attestation bundles were made for glyff_file_store-0.13.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.13.0.tar.gz -
Subject digest:
a60d3b7415264a65c989ddcbb83ae3981c04f959f93b08b84ea7b3191beb11fb - Sigstore transparency entry: 2070649346
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@96a869d4d4fcebac52410e07e3fa5abf24e650a6 -
Branch / Tag:
refs/tags/v0.13.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@96a869d4d4fcebac52410e07e3fa5abf24e650a6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file glyff_file_store-0.13.0-py3-none-any.whl.
File metadata
- Download URL: glyff_file_store-0.13.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd810ef3a037983db2538eb132a11360e1295fedd35213652bbb3a3a434b1878
|
|
| MD5 |
4ba7b8e5a614f2a0cb6cc9aef986090b
|
|
| BLAKE2b-256 |
7d1eb41dd938bb5d037d0080740343a37ad26909260dd94d615fd2b2f498acbc
|
Provenance
The following attestation bundles were made for glyff_file_store-0.13.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.13.0-py3-none-any.whl -
Subject digest:
cd810ef3a037983db2538eb132a11360e1295fedd35213652bbb3a3a434b1878 - Sigstore transparency entry: 2070649613
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@96a869d4d4fcebac52410e07e3fa5abf24e650a6 -
Branch / Tag:
refs/tags/v0.13.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@96a869d4d4fcebac52410e07e3fa5abf24e650a6 -
Trigger Event:
push
-
Statement type: