Skip to main content

Toolframe PostgreSQL storage

storage-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.3 and Core 0.5.3 or 0.6. Run one Core per application. Core 0.6 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.6.2 toolframe-storage-postgres==0.1.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.storage-postgres]
source = "pypi:toolframe-storage-postgres==0.1.0"
enabled = true

[bindings]
"toolframe.storage.sql" = "storage-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/storage" = "storage-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.3, Auth 0.2, MCP Auth 0.2 and OIDC Auth 0.2. 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.

Metadata

Release files for toolframe-storage-postgres 0.1.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-storage-postgres 0.1.0
File Size Uploaded
toolframe_storage_postgres-0.1.0.tar.gz 75.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for toolframe-storage-postgres 0.1.0
File Interpreter ABI Platform
toolframe_storage_postgres-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 100.8 kB

Release files / toolframe_storage_postgres-0.1.0.tar.gz

Download URL toolframe_storage_postgres-0.1.0.tar.gz
Size 75.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c61f23a6ee62715106c70f4eff87601f4dca0d22e19f4fb72be2baee18da88fe
BLAKE2b-256 checksum
How to use checksums
98bf89742c370e0df9032e180480c0bf4657c16aabae636f4135eabff870527b
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 14, 2026.

Transparency log

Release files / toolframe_storage_postgres-0.1.0-py3-none-any.whl

Download URL toolframe_storage_postgres-0.1.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22d9646398ff9b06607de13ece44d4b8319fc1023d1e38eab38b52751981ff7e
BLAKE2b-256 checksum
How to use checksums
66b796edae30b38a4a5bfe0f2f805c7a86b9f2fe94a12ad20e865beaafcbf580
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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