Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Vpod Python SDK

A lightweight, portable sandbox that gives an untrusted process an instant Linux environment.

GitHub CI

Documentation • Issues


It uses a RISC‑V architecture and runs entirely inside WebAssembly.

  • Fast startup : Boot in under a second.
  • Portable : Runs anywhere without any setup required.
  • Isolated : All execution state stays inside the WASM sandbox.

Installation

pip install vpod

Usage

All calls share the same running sandbox. Using a context manager (with) automatically cleans up resources when done:

from vpod import Sandbox

with Sandbox.create() as sbx:
    sbx.commands.run("export FOO=bar")
    sbx.commands.run("touch /tmp/data.csv")

    result = sbx.commands.run("echo $FOO")
    print(result.stdout)  # bar

Python REPL

Run Python code with persistent state across calls. Variables and imports persist for the lifetime of the session.

from vpod import Sandbox

with Sandbox.create() as sbx:
    sbx.code.run("import requests")
    sbx.code.run("data = [1, 2, 3]")
    result = sbx.code.run("print(sum(data))")
    print(result.text)  # 6

Advanced Configuration

You can mount local directories into the sandbox and specify which snapshot to use.

from vpod import Sandbox

# Mount a local workspace and use a snapshot with pre-installed data science tools
mounts = {"workspace": "/workspace:rw"}

with Sandbox.create(snapshot="vsnap-data", mounts=mounts) as sbx:
    sbx.code.run("import pandas as pd")
    sbx.code.run("print('Pandas is ready!')")

Suspend & Resume

Pause a running sandbox and resume it later — no daemon, no background process. Only dirty memory pages are saved, making it fast and storage-efficient.

from vpod import Sandbox

with Sandbox.create() as sbx:
    sbx.commands.run("uv pip install --system requests")
    instance_id = sbx.suspend()

# Later (even from a new process):
sbx = Sandbox.resume(instance_id)
sbx.code.run("import requests; print(requests.__version__)")
Method Description
sandbox.suspend() Suspend to disk, returns instance ID
Sandbox.resume(id) Resume a suspended instance
Sandbox.list_instances() List all instances
Sandbox.destroy(id) Delete a suspended instance from disk

Shell commands (stateless)

If you just need a quick one-off execution without preserving state:

from vpod import Sandbox

sbx = Sandbox.create()
result = sbx.commands.run("echo hello")
print(result.stdout)    # hello
sbx.close()             # Clean up the sandbox process

Snapshots

The first call to Sandbox.create() downloads the snapshot and caches it locally. Subsequent calls use the cache instantly.

To pre-download (e.g. in a Dockerfile or CI setup):

from vpod import snapshots

for s in snapshots.catalog():
    print(s["name"], s["tag"])

snapshots.pull("alpine:latest")

Available Snapshots

Name Tag Description Memory Limit (RAM)
alpine 3.23.0 Minimal Alpine Linux snapshot. 256 MB
vsnap-base 0.1.0 Alpine-based general-purpose snapshot with Python. 256 MB
vsnap-base-512mb 0.1.0 Same as vsnap-base with more memory headroom, for web servers and larger installs. 512 MB
vsnap-data 0.1.0 Alpine-based snapshot with numpy, pandas, and scipy. 512 MB

Documentation

Visit the Vpod documentation for the full guide and API reference. To report issues or contribute, head to the main GitHub repository.

Metadata

Release files for vpod 0.8.3rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vpod 0.8.3rc1
File Size Uploaded
vpod-0.8.3rc1.tar.gz 6.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for vpod 0.8.3rc1
File Interpreter ABI Platform
vpod-0.8.3rc1-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 MB

Release files / vpod-0.8.3rc1.tar.gz

Download URL vpod-0.8.3rc1.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
345c6cbc8a97706bd79fc35c0716f160712e8e89ccf673078068a3f9fbcaec47
BLAKE2b-256 checksum
How to use checksums
6804ce76834bec66b58500b47229abf01e53b651f75b28798370c285bb1fe58d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / vpod-0.8.3rc1-py3-none-any.whl

Download URL vpod-0.8.3rc1-py3-none-any.whl
Size 6.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f48867c05d223d2b6c7eb948a505e1fca00407d601c63357625f0cb8eaeb8fc1
BLAKE2b-256 checksum
How to use checksums
8d0176229eea07324bfe66dfb4afdb38754e58883abdb73653b5b5afd8810a65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release history Release notifications | RSS feed

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

This release

0.8.3rc1 This release

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page