Skip to main content

Toolframe SQLite provider

sql-sqlite owns data/plugins/<plugin-id>/data.sqlite, separately from core's management database. Plugins use RuntimeContext.sql() and parameterized SQL; the host supplies application, owner, generation, root and deadline identity. No file path or raw connection is returned. This is lifecycle/data ownership isolation for trusted local plugins, not an operating-system sandbox.

Install the provider into a running application before enabling plugins that require managed SQL:

toolframe --home APP plugin add pypi:toolframe-sql-sqlite==0.4.0 --enable

Normal SQL supports queries, mutations, indexes declared in migrations, and same-store transactions. Runtime DDL, transaction control, attachment, PRAGMAs and provider metadata access are denied by SQLite's authorizer. Transactions are bound to one root/generation and roll back on expiry, root loss or disposal. A statement failure poisons a transaction. Mutation IDs and same-database receipts allow callers to resolve an unknown acknowledgement without repeating a write.

Each application/owner store lazily pools one writer connection and one separate reader connection. A transaction retains the writer until commit, rollback, expiry or root cleanup; standalone mutations use the same writer. Other writes wait asynchronously instead of opening competing write connections, leaving the holder free to finish its next RPC. Committed-state reads and other owners can proceed while a transaction is open. Return all writes within a transaction through its transaction client/token; a second unscoped writer from the same root/store is rejected as nested_transaction instead of waiting on itself. A queued transaction also reserves its root/store: await an earlier write before beginning a transaction, and await begin before issuing its token-bound writes.

Each connection slot permits at most 128 waiting calls. Admission obeys the host-issued root deadline and cancellation; a full queue returns storage_busy before that call runs SQL. Connections are reset before reuse and closed on provider disposal. This coordinates one provider process, not arbitrary external SQLite writers. SQL execution is still synchronous and external lock contention retains SQLite's 50ms busy timeout. Pooling does not provide business idempotency or make long-running SQL nonblocking.

Empty stores initialize automatically. Existing schema changes require a core migration plan and explicit apply. Apply checks the plan/history, uses SQLite's backup API, executes all pending migrations and history in one transaction, and rolls back failures. Nontransactional statements are rejected. Committed schema changes are never automatically reverted; backups require an explicit operator repair workflow. Disabling/uninstalling a plugin retains its database.

The toolframe.sql.admin service is host-only. Business plugins declare a requirement on toolframe.sql version 1. Cross-plugin data access uses the owning plugin's business service. There are no cross-database transactions.

Development: uv sync --group dev, uv run pytest -q, uv build --no-sources. The sibling SDK UV source is a development convenience; wheels depend only on the published SDK contract.

For isolated local validation, GitHub Actions and manual PyPI publishing, see CI and publishing.

For release validation and Trusted Publisher setup, see releasing.

License

Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.

Version 0.3 adds execute_returning for mutations with a RETURNING clause. It returns rows and rowcount, including within transactions and durable mutation receipts. Existing SQLite SQL, migration checksums and execute results are preserved; PostgreSQL variants in migration declarations do not change SQLite history.

For development hooks and contribution rules, see Contributing.

Plugin dependencies allow compatible SDK 0.x updates from the declared minimum. See the SDK compatibility policy for API guarantees and minimum/latest verification.

Metadata

Release files for toolframe-sql-sqlite 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toolframe-sql-sqlite 0.4.2
File Size Uploaded Provenance Actions
toolframe_sql_sqlite-0.4.2.tar.gz 41.8 kB With provenance Details for toolframe_sql_sqlite-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toolframe-sql-sqlite 0.4.2
File Interpreter ABI Platform Actions
toolframe_sql_sqlite-0.4.2-py3-none-any.whl Python 3 none any Details for toolframe_sql_sqlite-0.4.2-py3-none-any.whl

Total release size: 57.2 kB

Release files / toolframe_sql_sqlite-0.4.2.tar.gz

Download URL toolframe_sql_sqlite-0.4.2.tar.gz
Size 41.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7ceae6ae3ac7c88332accc57c7a5132f67d656f0b8fb412ae03559b300726f94
BLAKE2b-256 checksum
How to use checksums
97e7e127dcae7c568927cd8c6029ae4fa952e2bb5ec91533e2f1750f3dc70d1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / toolframe_sql_sqlite-0.4.2-py3-none-any.whl

Download URL toolframe_sql_sqlite-0.4.2-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bcab3342e7320f07bf69f896ed5b9fdf0ac111f24207ead690e0ff543831601
BLAKE2b-256 checksum
How to use checksums
0d3eb2c253a3fe091e3e8b4a0b785752de95019d5b001d3566d8b266d16c2ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for toolframe-sql-sqlite 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toolframe_sql_sqlite-0.4.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page