File-metadata primitive for Flametrench: storage-agnostic metadata, lifecycle, and authz-mediated access (ADR 0020).
Project description
flametrench-file
File-metadata primitive for the Flametrench v0.4 platform (ADR 0020).
What this is
Metadata and lifecycle for files — no blob bytes in the contract. storage_ref is an opaque adopter pointer (S3 key, GCS path, URL) stored verbatim; the primitive never dereferences it. Access is mediated by authz (ADR 0001); a file_ record is an authz object.
Lifecycle: pending → active (freezes size_bytes/checksum/storage_ref) → deleted (soft — record retained). Deleted files remain fetchable.
Install
pip install flametrench-file
Requires Python ≥ 3.11 and flametrench-ids >= 0.4.0.
Quick start
from flametrench_file import InMemoryFileStore
store = InMemoryFileStore()
# Register directly as active
f = store.create_file_metadata(
scope="org_...",
owner_usr_id="usr_...",
name="q3-report.pdf",
content_type="application/pdf",
size_bytes=184320,
checksum={"algo": "sha-256", "value": "e3b0c44..."},
storage_ref="s3://bucket/q3-report.pdf",
status="active",
)
# Or: pending handshake → activate on upload complete
p = store.create_file_metadata(
scope="org_...", owner_usr_id="usr_...",
name="upload.bin", content_type="application/octet-stream",
status="pending",
)
store.update_file_metadata(
p.id, status="active",
size_bytes=4096,
checksum={"algo": "sha-256", "value": "9f86d08..."},
storage_ref="s3://bucket/upload.bin",
)
License
Apache-2.0 © NDC Digital, LLC
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 flametrench_file-0.4.0.tar.gz.
File metadata
- Download URL: flametrench_file-0.4.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
964ecc8d99b8f49aabc74c62fe4450306744d1531c7dba062d2e5562e3b4b101
|
|
| MD5 |
49fc6dd144783cc35390ea5c967bb184
|
|
| BLAKE2b-256 |
1fbef3488327017df0680a0a51ab0dcd47d5a330e466526216eee24416b1ce35
|
Provenance
The following attestation bundles were made for flametrench_file-0.4.0.tar.gz:
Publisher:
publish.yml on flametrench/file-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flametrench_file-0.4.0.tar.gz -
Subject digest:
964ecc8d99b8f49aabc74c62fe4450306744d1531c7dba062d2e5562e3b4b101 - Sigstore transparency entry: 1752199365
- Sigstore integration time:
-
Permalink:
flametrench/file-python@9eaa7612de8b926ae1c8b80931af5236cdffaeb1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flametrench
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9eaa7612de8b926ae1c8b80931af5236cdffaeb1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file flametrench_file-0.4.0-py3-none-any.whl.
File metadata
- Download URL: flametrench_file-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.8 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 |
ee8a7d0e12744b212bb0f7b883d85b83750301b81fa71d3e004d426ec9e3775d
|
|
| MD5 |
ec1ac86b50383eeb98a69a6018c91aba
|
|
| BLAKE2b-256 |
80945c0b019baa44650f4f3ff3d9ad4a078ea7f274548496a15d49992a53f70d
|
Provenance
The following attestation bundles were made for flametrench_file-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on flametrench/file-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flametrench_file-0.4.0-py3-none-any.whl -
Subject digest:
ee8a7d0e12744b212bb0f7b883d85b83750301b81fa71d3e004d426ec9e3775d - Sigstore transparency entry: 1752199401
- Sigstore integration time:
-
Permalink:
flametrench/file-python@9eaa7612de8b926ae1c8b80931af5236cdffaeb1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flametrench
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9eaa7612de8b926ae1c8b80931af5236cdffaeb1 -
Trigger Event:
workflow_dispatch
-
Statement type: