Download src/core/traceability/__init__.py from anaselamr/yaz: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/core/traceability/__init__.py
- Command line
-
hf download hf://spaces/anaselamr/yaz/src/core/traceability/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/anaselamr/yaz/resolve/main/src/core/traceability/__init__.py
1.05 kB
| """ | |
| YAZ Core — Traceability Module | |
| ================================ | |
| Canonical blockchain/hash traceability layer. | |
| Rule (AGENTS.md): ALL chain-interaction logic MUST go through this module. | |
| Never write chain logic inside engine service layers directly. | |
| ON-CHAIN (hashes/signatures only): | |
| - Protocol version hashes | |
| - Workflow execution signatures | |
| - Audit notarization hashes | |
| - Research publication timestamps | |
| - Institutional validation records | |
| - Consent proof hashes | |
| - Dataset integrity proofs | |
| NEVER on-chain: | |
| - Raw patient data / PHI | |
| - Full records or documents | |
| - Any identifiable clinical data | |
| Architecture: off-chain clinical data (PostgreSQL) + on-chain hashes (append-only log) | |
| """ | |
| from .hasher import compute_hash, compute_protocol_hash, compute_workflow_signature | |
| from .models import HashRecord, HashRecordType | |
| from .service import TraceabilityService | |
| __all__ = [ | |
| "TraceabilityService", | |
| "HashRecord", | |
| "HashRecordType", | |
| "compute_hash", | |
| "compute_protocol_hash", | |
| "compute_workflow_signature", | |
| ] | |