Skip to content

Process

Process endpoints let you execute one-shot commands inside a running sandbox.

Run a shell command and wait for the result. The command runs inside /bin/sh -c.

from leap0 import Leap0Client
client = Leap0Client()
sandbox = client.sandboxes.create()
result = sandbox.process.execute(
command="echo Hello from Leap0",
cwd="/home/user",
timeout=30,
)
print(result.exit_code)
print(result.stdout)
print(result.stderr)