MODULE REFERENCE

artifacts

anomx.execution.work.artifacts

Validation and local storage for portable run outputs.

artifact_metadata

artifact_metadata(value: Mapping[str, Any] | None) -> dict[str, Any]

Copy finite JSON metadata, rejecting lossy conversion of object keys.

Signature parameters
ParameterTypeDefault
valueMapping[str, Any] | Nonerequired

Returns dict[str, Any]

artifact_name

artifact_name(value: str) -> str

Return a portable filename without accepting directory components.

Signature parameters
ParameterTypeDefault
valuestrrequired

Returns str

read_artifact

read_artifact(path: Path) -> bytes

Read a bounded regular file; never stream devices or special files.

Signature parameters
ParameterTypeDefault
pathPathrequired

Returns bytes

store_local_artifact

store_local_artifact(directory: Path, name: str, content: bytes, metadata: dict[str, Any]) -> dict[str, Any]

Keep a content-addressed copy independently of the original output file.

Signature parameters
ParameterTypeDefault
directoryPathrequired
namestrrequired
contentbytesrequired
metadatadict[str, Any]required

Returns dict[str, Any]

MAX_ARTIFACT_BYTES

MAX_ARTIFACT_BYTES = 64 * 1024 * 1024

MAX_METADATA_BYTES

MAX_METADATA_BYTES = 64 * 1024