Skip to main content
Create and manage runtimes (sandboxes) with the Gravix Layer Python SDK.

Install

Authenticate

Create an API key in the console, then set it in your environment:
Or pass it when constructing the client:
See API Keys for details.

Create and run a sandbox

A runtime is an isolated sandbox. Create one, run code, then terminate it.
More create options: Create Runtime.

Run code

Every run_code call returns structured output (text, success, and optional error details).
JavaScript and persistent contexts: Run Code.

Run commands

Use run_cmd for shell commands. Pass a single string, or command + args.
Install packages and scripts: Run Command.

Read and write files

Full file API: Write File, Read File.

List and clean up

What’s next

Quickstart

Secrets, network policies, and a fuller walkthrough

CLI Usage

Install the CLI and manage sandboxes from your terminal

Templates

Base sizes and custom template builds

Runtime overview

What a runtime sandbox can do