Skip to main content

Toolframe local object storage

object-store-local stores private binary files for Toolframe business plugins. It implements toolframe.object_store v1, so plugins can use local disk or an S3-compatible provider through the same RuntimeContext.object_store() client.

Quick start

Use Toolframe Core 0.6.2 and SDK 0.3.0. With the application running:

toolframe --home APP plugin add pypi:toolframe-object-store-local==0.1.0 --enable

For a local source-development example with a Dashboard page, see Image Gallery.

Business plugins declare Requirement(service="toolframe.object_store") under alias objects. Inside an admitted handler:

objects = self.context.object_store()
metadata = await objects.put(
    "images/example.png", image_bytes, content_type="image/png"
)
image_bytes = await objects.get(metadata["key"])
page = await objects.list(prefix="images/", limit=20)
await objects.delete(metadata["key"])

Core provides data/objects/object-store-local/. Objects are partitioned by the application ID and owning plugin, and keys are hashed into filenames. A single file holds metadata and content; publication uses fsync and atomic replacement. No filesystem path is accepted from business callers. Symlink object files and namespace directories are refused. Keep the application ID stable when restoring a backup. Back up this directory along with the application configuration.

Limits and behavior

  • At most 64 MiB per object; optional max_object_bytes lowers the limit.
  • Transfers use the SDK's 256 KiB chunk protocol with size and SHA-256 validation.
  • Temporary uploads expire after ten minutes and do not survive worker restart.
  • Completed objects survive reload, disable and uninstall. Delete is explicit.
  • One enabled object-store provider per application, independent of SQL storage.
  • Replacement is last-writer-wins; there is no transaction with SQL records.
  • Listings page by key, return at most 100 items, and scan local object headers. This backend is intended for modest local collections, not large remote stores.
  • No public URL or file-serving route is created. Business services own access checks; Dashboard renders bytes through the usual page/service bridge.

Switching providers does not copy objects automatically. Plugin workers are trusted code, not an operating-system sandbox. The atomic file format assumes a local filesystem supporting fsync and atomic rename; network filesystems are not verified.

Development

For sibling source checkouts, with the matching SDK changes checked out:

uv sync --group dev
uv run pytest -q
uv run ruff check src tests
uv build --no-sources

Unit tests exercise persistence, isolation, pagination, failed publication, checksums and path/symlink rejection. The package requires Python 3.14 or later.

Licensed under Apache-2.0; see LICENSE.

For release validation and Trusted Publisher setup, see releasing.

Metadata

Release files for toolframe-object-store-local 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-object-store-local 0.1.0
File Size Uploaded
toolframe_object_store_local-0.1.0.tar.gz 31.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for toolframe-object-store-local 0.1.0
File Interpreter ABI Platform
toolframe_object_store_local-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 kB

Release files / toolframe_object_store_local-0.1.0.tar.gz

Download URL toolframe_object_store_local-0.1.0.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d5d4094ef24cf1d16f6c52d2d36bb886121ef25618453f4b2ad90872db31f38e
BLAKE2b-256 checksum
How to use checksums
3c0ff42f61cfc52a115a902de98315fe8cbacb9c7664e07a2b6f818667d63cce
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_object_store_local-0.1.0-py3-none-any.whl

Download URL toolframe_object_store_local-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2874906f97aa5f419d1f8b1da395f0f2d6cc0c131af2994d7b594026672ebd7
BLAKE2b-256 checksum
How to use checksums
f1f0ee33f30cea5e8cf39d16b4c7fafe75fd3cf1632d148905ffbc7a186a039b
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