Skip to main content
Captured stdout is intended for process output and is capped. Store a binary deliverable in the filesystem, retain the result image, then download and verify it as bytes.

Prerequisites and complete source

Complete Set up access. In a fresh project, run uv init --python 3.12 and uv add "contree-sdk==0.3.6". Save as binary_artifact.py:
Run uv run python binary_artifact.py. The input bytes are injected into the operation, transformed into a deterministic gzip artifact, downloaded, and checked for its gzip header, decompressed content, and SHA-256 digest. The digest checks that the downloaded bytes match the remote file; decompression checks that the file contains the expected input. The retained result is required because inspection and download happen after execution. A disposable run returns no image to inspect. If generation exits nonzero or the image UUID is absent, do not download from the input image. If download fails after execution, retry the read by the recorded image UUID rather than rerunning untrusted code. The local file remains until removed by the user; the remote image follows image retention. For large inputs or artifacts, confirm the applicable size limits with support before running the workload. See Work with files and artifacts.