SQLite-backed durable SessionStore for glyff.
Project description
glyff-sqlite
SQLite-backed durable ExecutionRepository implementation for
glyff.
This is the production backend: one row per execution in a SQLite
executions table, WAL mode, indexed lookups, and native transaction
atomicity. Execution result and metadata columns are stored as readable JSON
text, so serializers used with this backend must produce JSON text.
Install
pip install glyff-sqlite
This package depends on glyff>=0.1.0 (no additional runtime dependencies —
sqlite3 is part of the standard library).
Usage
from glyff_sqlite import SQLiteBackend
backend = SQLiteBackend("executions.sqlite3")
Public API
| Name | Description |
|---|---|
SQLiteBackend |
Bundle exposing repository and transaction provider. |
SQLiteExecutionRepository |
Durable repository backed by local SQLite. |
SQLiteTransactionProvider |
Transaction provider for the SQLite backend. |
The underlying SQLiteClient is internal and not part of the public API.
Per-execution metadata
Persist application data alongside an execution from within an engraved call:
ctx = glyff.get_context()
await ctx.metadata.set("my_key", {"any": "json-serializable value"})
value = await ctx.metadata.get("my_key", dict)
Metadata is a keyed map owned by the current Execution aggregate.
ctx.metadata.set(...) stages metadata into the currently active transaction.
During normal engraved execution, metadata set in the function body commits
atomically with the execution's COMPLETED status and result. If completing
the current execution fails, metadata staged through ctx.metadata.set(...) in
that function body is rolled back with the completion write.
Metadata is removed if that execution's record is deleted.
Transaction model
- Writes are staged in-memory per transaction and flushed on commit.
- Nested transactions (child scopes) commit independently of their parent.
BEGIN IMMEDIATEprevents writer contention; WAL mode keeps reads fast.- A per-database asyncio write lock serialises concurrent write transactions.
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_sqlite-0.13.0.tar.gz.
File metadata
- Download URL: glyff_sqlite-0.13.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d28ee1a6ca9049a1fc1848d777fecbf216efadfc1f7e0c3e7871ae228c56e190
|
|
| MD5 |
5ff0da89e5067052ce39498e86d6b7be
|
|
| BLAKE2b-256 |
d3e3d720251edd93a8a1f1c6948a190bb0feafd83f211a2dcdf05e09c4113e19
|
Provenance
The following attestation bundles were made for glyff_sqlite-0.13.0.tar.gz:
Publisher:
publish-glyff-sqlite.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_sqlite-0.13.0.tar.gz -
Subject digest:
d28ee1a6ca9049a1fc1848d777fecbf216efadfc1f7e0c3e7871ae228c56e190 - Sigstore transparency entry: 2070649358
- 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-sqlite.yml@96a869d4d4fcebac52410e07e3fa5abf24e650a6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file glyff_sqlite-0.13.0-py3-none-any.whl.
File metadata
- Download URL: glyff_sqlite-0.13.0-py3-none-any.whl
- Upload date:
- Size: 8.6 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 |
63699ea2615ea4763ca2b9f30977ed149181cae9c10a2d912086615a96addba8
|
|
| MD5 |
e1c671a32d840396f44229d1525975a1
|
|
| BLAKE2b-256 |
8250c4f6046f2cbe5dbf01c73a017ea30db8cdb9077296d70d5a1b4548fac035
|
Provenance
The following attestation bundles were made for glyff_sqlite-0.13.0-py3-none-any.whl:
Publisher:
publish-glyff-sqlite.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_sqlite-0.13.0-py3-none-any.whl -
Subject digest:
63699ea2615ea4763ca2b9f30977ed149181cae9c10a2d912086615a96addba8 - Sigstore transparency entry: 2070649549
- 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-sqlite.yml@96a869d4d4fcebac52410e07e3fa5abf24e650a6 -
Trigger Event:
push
-
Statement type: