Download src/core/artifacts/__init__.py from anaselamr/yaz: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/core/artifacts/__init__.py
- Command line
-
hf download hf://spaces/anaselamr/yaz/src/core/artifacts/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/core/artifacts/__init__.py
775 Bytes
| """ | |
| Core Artifacts — Content-Addressed Immutable Storage | |
| ===================================================== | |
| IPFS-style content-addressed artifact storage with multi-peer replication. | |
| Artifacts are immutable binary objects (reports, media, protocols, signed outputs) | |
| referenced by their SHA-256 content ID. Metadata lives in PostgreSQL; | |
| actual bytes live on local disk (primary) with async replication to | |
| S3/Minio and peer nodes. | |
| Usage: | |
| from core.artifacts.service import ArtifactService | |
| artifact = await ArtifactService.store( | |
| file_bytes, filename="report.pdf", artifact_type="report", | |
| tenant_id=tid, owner_id=uid | |
| ) | |
| # artifact.content_id == "sha256:a1b2c3..." | |
| """ | |
| from .service import ArtifactService | |
| __all__ = ["ArtifactService"] | |