Skip to main content
What to install and a runnable Python example. The settings, how the workspace connects and the notes are on WASI, shared by both SDKs.

Usage

In the Python SDK

Install the extra:
Without it, WasiRuntime(...) raises ImportError.
  • A read-only mount, or a session narrowed to read, refuses a write at open() with OSError: errno 30 on the host and Monty, or preview1 errno 69 under WASI.
  • The CPython build is read-only in the run. A mount at / coexists with it: each mount wins under its prefix.
  • A run starts in the shell’s working directory; a missing one fails before any code runs. A direct execute() runs in its context’s cwd.
  • A script runs as in CPython: __file__ is absolute, tracebacks quote its lines, and sys.path[0] is its directory (-P and -I leave it off).
  • The first run compiles python.wasm and caches python.cwasm beside it; later runs start in milliseconds. A timeout stops the run.