Sandboxes
Cloudflare Container Machine in Python
Run captured programs in a Cloudflare Container through a relay.
Runs programs in a Cloudflare Container through a relay. Settings and notes: Cloudflare Container.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run captured programs in a Cloudflare Container through a relay.
pip install 'mirage-ai[ssh]'
from mirage import RAMVFS, MountMode, Workspace
ws = Workspace(
{"/data": RAMVFS()},
mode=MountMode.EXEC,
machines={
"box": {
"provider": "cloudflare_container",
"url": "https://mirage-relay.example.workers.dev/box",
"token": "relay-token",
"mount_type": "ssh",
"captures": ["@python", "@external"],
}
},
)
await ws.shell("python3 -c 'print(1 + 1)'")