glyff-sqlite
SQLite-backed durable ExecutionRepository implementation for
glyff.
This is the production backend: one row per execution in a SQLite
glyff_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.
table_prefix (default glyff) names the two tables the store owns:
<prefix>_executions and <prefix>_meta, which records the format version so a
store written by an incompatible build is refused. Pass table_prefix= to
cohabit an application's own database; PRAGMA user_version is left to the
application.
Install
pip install glyff-sqlite
This package depends on glyff>=0.14.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 the store's collaborators. |
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.
Storage model
- One row per execution;
arguments,resultandmetadataare JSON text columns, readable in place with any SQLite client. argumentsholds the canonical arguments verbatim — the row's key is their digest, so the column is stored and returned byte-for-byte rather than re-encoded.- Records are keyed by
(session_id, path); a<prefix>_session_domainsrow carries the version one session claimed for one domain, and a single<prefix>_metarow the store's format version. - Per-execution metadata (see the
glyff README) commits atomically with the
execution's
COMPLETEDstatus and result, and is removed with the execution's row when the record is deleted.
Transaction model
- Enumeration streams the range scan a batch of rows at a time, so a sweep over a large table costs bounded memory.
- 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 session's version for a domain is claimed inside one, so workers racing to resume the same session agree on a single winner.- A per-database asyncio write lock serialises concurrent write transactions.
Planned
- Store migrations — nothing yet converts a store from one format version to the next (#41).
- External transaction enlistment — running inside an application's own connection (#42).
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_sqlite-0.16.0.tar.gz.
File metadata
- Download URL: glyff_sqlite-0.16.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc0c291cb9f8480ba4e3e1ae2539c35173cdd9662d287c8fb91d9cc61d7b2079
|
|
| MD5 |
ec7fc10031c90378b668c65c6932b088
|
|
| BLAKE2b-256 |
db4fc608313099d1562466b6c3407d9be17aae777d185d73c2fe78924ec26f31
|
Provenance
The following attestation bundles were made for glyff_sqlite-0.16.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.16.0.tar.gz -
Subject digest:
bc0c291cb9f8480ba4e3e1ae2539c35173cdd9662d287c8fb91d9cc61d7b2079 - Sigstore transparency entry: 2473405956
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@aa140cf63935ffe2452e07750407ddb31380810c -
Branch / Tag:
refs/tags/v0.16.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@aa140cf63935ffe2452e07750407ddb31380810c -
Trigger Event:
push
-
Statement type:
File details
Details for the file glyff_sqlite-0.16.0-py3-none-any.whl.
File metadata
- Download URL: glyff_sqlite-0.16.0-py3-none-any.whl
- Upload date:
- Size: 13.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 |
5f74f8f05638dcfa468d17aeaa4d384ca082454d604ab8962a7886bf19780c95
|
|
| MD5 |
28c9558a80cd24c6f3c040d7c8dfe1b9
|
|
| BLAKE2b-256 |
7f3272c3087b8e988ce392bf0df61354ed3a061b95c1d52e35ccfe072905ab37
|
Provenance
The following attestation bundles were made for glyff_sqlite-0.16.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.16.0-py3-none-any.whl -
Subject digest:
5f74f8f05638dcfa468d17aeaa4d384ca082454d604ab8962a7886bf19780c95 - Sigstore transparency entry: 2473405975
- Sigstore integration time:
-
Permalink:
nueruyu/glyff@aa140cf63935ffe2452e07750407ddb31380810c -
Branch / Tag:
refs/tags/v0.16.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@aa140cf63935ffe2452e07750407ddb31380810c -
Trigger Event:
push
-
Statement type: