Hyperlight
v0.1.1Runs Python in a local, hardware-isolated micro-VM that keeps its state between calls
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
run_python Run Python in a micro-VM
Run Python code in a sandbox: a local Hyperlight micro-VM, isolated from this machine by a hypervisor. Variables, imports and functions persist from one call to the next, as in a notebook, until reset_sandbox. The result is what the code prints, then the value of a trailing expression after `Out:`. The sandbox has CPython 3.12 with numpy, pandas, scipy, scikit-learn, matplotlib, pillow and requests. Network: none, every connection is refused. Files: the sandbox has its own filesystem, and none of this machine's files. A call that runs longer than 30 seconds is stopped. That, or a crash, restar…
| Parameter | Type | Description |
|---|---|---|
code * | string | The Python code to run |
reset_sandbox Reset the sandbox
Replace the sandbox with a fresh one, in milliseconds: variables and imports are gone. It first waits for calls still running or sent before it, each of which runs for at most 30 seconds, then for the restart one that ran out of time needs; longer while the sandbox first starts, its image pulled.