Skip to main content

Toolframe PostgreSQL storage

sql-postgres stores Toolframe plugin data in PostgreSQL. Entry Register, Auth, MCP Auth and OIDC Auth use a separate schema per plugin inside one database per application environment. Database access is loaded only from the runtime process environment; credentials do not belong in toolframe.toml.

This release requires Toolframe SDK 0.4 and Core 0.7. Run one Core per application. Core 0.7 can separately store its management journal in a dedicated PostgreSQL database; SQLite remains the default. Configuration, private keys and artifacts still need a persistent application home. PostgreSQL storage does not make Core stateless or enable multiple replicas. Existing SQLite data is not imported. Plugins are trusted Python code.

Quick start

Use Python 3.14+, PostgreSQL 16+, and pg_dump / pg_restore with the same major version as the server. PostgreSQL 16 is the integration-test baseline.

Install the host and provider CLI from PyPI:

uv venv --python 3.14.7 .venv
uv pip install --python .venv/bin/python \
  toolframe-core==0.7.0 toolframe-sql-postgres==0.2.0
.venv/bin/toolframe-core --home ./app init

Read [application].id from app/toolframe.toml. Supply an administrator DSN from your secret manager as TOOLFRAME_POSTGRES_SETUP_DSN. It is used only by setup. The CLI output file contains generated runtime credentials and must remain private.

.venv/bin/toolframe-postgres setup \
  --application-id '<id from app/toolframe.toml>' \
  --database toolframe_development \
  --owner entry-register --owner auth --owner mcp-auth --owner oidc-auth \
  --output ./app/.toolframe/postgres-environment.json
unset TOOLFRAME_POSTGRES_SETUP_DSN

Add the provider to app/toolframe.toml:

[plugins.sql-postgres]
source = "pypi:toolframe-sql-postgres==0.2.0"
enabled = true

[bindings]
"toolframe.sql" = "sql-postgres"

This configuration sends every SQL consumer to PostgreSQL. Core builds with multiple SQL provider support can also run SQLite, using an explicit per-plugin override such as "entry-register/sql" = "sql-sqlite" in [bindings]. Choose bindings before initializing stores: changing a retained store's provider is rejected and does not copy data. Earlier Core builds require one enabled storage provider. The package version alone does not identify multiple-provider support; build the matching Core revision when using mixed providers.

Install the matching business plugins before enabling them: Entry Register 0.4, Auth 0.3, MCP Auth 0.3 and OIDC Auth 0.3. Each store owner must be provisioned before Core starts its plugin.

.venv/bin/toolframe-postgres run \
  --env-file ./app/.toolframe/postgres-environment.json -- \
  .venv/bin/toolframe-core --home ./app serve

The run helper exports the private document as environment variables and replaces itself with Core. It removes setup/test administrator variables. Containers can inject the same runtime values directly; the provider does not read that file.

For release validation and Trusted Publisher setup, see releasing.

License

Apache-2.0. See LICENSE and NOTICE.

For development hooks and contribution rules, see Contributing.

Metadata

Release files for toolframe-sql-postgres 0.2.0

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-postgres 0.2.0
File Size Uploaded Provenance Actions
toolframe_sql_postgres-0.2.0.tar.gz 77.7 kB With provenance Details for toolframe_sql_postgres-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 103.2 kB

Release files / toolframe_sql_postgres-0.2.0.tar.gz

Download URL toolframe_sql_postgres-0.2.0.tar.gz
Size 77.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1b22985711cb68ab8355b22ffc04e7c4c95de40506b34800cdd459d0b3f9b04f
BLAKE2b-256 checksum
How to use checksums
95af185dc0a68858939bcd9ae2fc0af229b098657894ccad8dbb6c0b2f4bdd7e
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 19, 2026.

Transparency log

Release files / toolframe_sql_postgres-0.2.0-py3-none-any.whl

Download URL toolframe_sql_postgres-0.2.0-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67489fbf710cb3c4e5b66ece8b7fc1647340b60573357ec64ed71bc1e6d9e0bf
BLAKE2b-256 checksum
How to use checksums
d4089edff0a8874c647cd513da4f2625e9c7935782999ad60acd76f0407373f6
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 19, 2026.

Transparency log

Security for toolframe-sql-postgres 0.2.0

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_postgres-0.2.0.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 19, 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