Skip to main content
from gravixlayer import GravixLayer

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

# Create a file in the runtime so we have something to download
runtime.file.write("/workspace/report.csv", "id,name\n1,alpha\n2,beta\n")

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

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

runtime.kill()

Parameters

ParameterTypeRequiredDescription
pathstringYesFile path inside the runtime

Response

Returns raw bytes. Write directly to a local file.