Virtual file storage backed by PostgreSQL for sonnet-server applications
Project description
sonnet-storage
Virtual file storage backed by PostgreSQL for sonnet-server applications.
Provides a UPath-compatible
filesystem abstraction over a database table. Consumers use standard
pathlib operations (read_text(), write_text(), iterdir(), etc.)
and the backend (local filesystem or database) is transparent.
Quick Start
from sonnet_storage import get_storage_root, register_protocol
# Register the db:// protocol (once at startup)
register_protocol()
# Use like pathlib
root = get_storage_root()
rules = root / "rules"
for f in rules.iterdir():
content = f.read_text()
Features
- Text, JSON (native JSONB), and binary content storage
- Soft delete with recovery
- Versioning (monotonic counter per file)
- Seeding from local directories / package data
- Configurable UPath protocol name (default:
db://) - Pre-built REST router factory
- Optional
StorageExtensionfor auto-registration
Database
PostgreSQL only. See docs/data-model.md for the complete schema reference. Consumers own their Alembic migrations -- see ADR-0002.
Documentation
Project details
Release history Release notifications | RSS feed
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 sonnet_storage-0.1.0.tar.gz.
File metadata
- Download URL: sonnet_storage-0.1.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17bb9da5642e76ea2d2c0191c28f593e90038f14c1333d8e6b6b4a1b58e64372
|
|
| MD5 |
f30887c1091aa88d48b391976b56698b
|
|
| BLAKE2b-256 |
71bc8761f50b312f556a6c045d3456ef2cf98ceac2050386d64c751fedae154c
|
Provenance
The following attestation bundles were made for sonnet_storage-0.1.0.tar.gz:
Publisher:
publish.yml on petrarca/sonnet-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonnet_storage-0.1.0.tar.gz -
Subject digest:
17bb9da5642e76ea2d2c0191c28f593e90038f14c1333d8e6b6b4a1b58e64372 - Sigstore transparency entry: 1635030700
- Sigstore integration time:
-
Permalink:
petrarca/sonnet-server@b9d2f15dceed7b935813be16f065b7fc993f296c -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/petrarca
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9d2f15dceed7b935813be16f065b7fc993f296c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sonnet_storage-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sonnet_storage-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aa6fef700bc96a292f2b5e299e72479c6a905df147395db22e663f376f4e6dd
|
|
| MD5 |
20c3eab743b39952791a10b71d6f5b7e
|
|
| BLAKE2b-256 |
79fd121bd4586d2c2a5b560be0b581ba9c97731f4f02ca4f06053bb9fd23ac04
|
Provenance
The following attestation bundles were made for sonnet_storage-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on petrarca/sonnet-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonnet_storage-0.1.0-py3-none-any.whl -
Subject digest:
7aa6fef700bc96a292f2b5e299e72479c6a905df147395db22e663f376f4e6dd - Sigstore transparency entry: 1635031028
- Sigstore integration time:
-
Permalink:
petrarca/sonnet-server@b9d2f15dceed7b935813be16f065b7fc993f296c -
Branch / Tag:
refs/tags/v0.1.13 - Owner: https://github.com/petrarca
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9d2f15dceed7b935813be16f065b7fc993f296c -
Trigger Event:
push
-
Statement type: