File-based SessionStore implementation for glyff.
Project description
glyff-file-store
A file-based SessionStore implementation for
glyff.
Sessions are persisted to disk as a JSON event log. The whole log is loaded into memory at startup and the file is rewritten atomically on each commit; suitable for sessions where the log fits comfortably in memory. For very large or high-throughput sessions, prefer a database-backed store.
Install
pip install glyff-file-store
This package depends on glyff>=0.1.0.
Public API
| Name | Description |
|---|---|
FileClient |
Low-level file I/O for a session directory. |
JsonFileSessionStore |
SessionStore writing a pretty-printed JSON event log file. |
Format
Each session lives under <base_dir>/<session_id>/ and stores its event log
in a single pretty-printed JSON file (executions.json). The whole log is
read into memory on startup and rewritten atomically on every commit.
Commit atomicity
FileClient 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 via two renames (session →
session.bak, tmp → session, drop session.bak). 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 FileClient(...) instantiation
restores the session from session.bak (when the live directory is missing)
or drops the stale backup (when the live directory is already in place), and
removes any orphan .commit-* temp directories.
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.5.0.tar.gz.
File metadata
- Download URL: glyff_file_store-0.5.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
040baab635f8ed105e89d6ba3fde573ca75d8cb248d447117573dd3ca3d7d850
|
|
| MD5 |
91939539e9f33495f65a6159f75b17b9
|
|
| BLAKE2b-256 |
f501cf16dbed4406b1731129dfc041cfad0dfcf5844879c7f96c38c673772ec4
|
Provenance
The following attestation bundles were made for glyff_file_store-0.5.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.5.0.tar.gz -
Subject digest:
040baab635f8ed105e89d6ba3fde573ca75d8cb248d447117573dd3ca3d7d850 - Sigstore transparency entry: 1710066334
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@41142cec062fe3f84320355434b9c0aed45c4c16 -
Branch / Tag:
refs/tags/v0.5.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@41142cec062fe3f84320355434b9c0aed45c4c16 -
Trigger Event:
push
-
Statement type:
File details
Details for the file glyff_file_store-0.5.0-py3-none-any.whl.
File metadata
- Download URL: glyff_file_store-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.0 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 |
c7db309732a795657b982a18f05093d604eed764e9e7116ae64fa134aadd5943
|
|
| MD5 |
020ad1bb7a432a3a5ebdbded6b20891f
|
|
| BLAKE2b-256 |
37f30b36cbc2e8bf837b45fbd148ede00f1c479665e68a42ede99df917fa9715
|
Provenance
The following attestation bundles were made for glyff_file_store-0.5.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.5.0-py3-none-any.whl -
Subject digest:
c7db309732a795657b982a18f05093d604eed764e9e7116ae64fa134aadd5943 - Sigstore transparency entry: 1710066370
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@41142cec062fe3f84320355434b9c0aed45c4c16 -
Branch / Tag:
refs/tags/v0.5.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@41142cec062fe3f84320355434b9c0aed45c4c16 -
Trigger Event:
push
-
Statement type: