Skip to main content
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.12-base-small")

# Download file as raw bytes
content = client.runtime.download_file(runtime.runtime_id, path="/workspace/report.csv")

with open("./report.csv", "wb") as f:
    f.write(content)

client.runtime.kill(runtime.runtime_id)

Parameters

ParameterTypeRequiredDescription
runtime_idstringYesRuntime identifier
pathstringYesFile path inside the runtime

Response

Returns raw bytes. Write directly to a local file.