Vpod Python SDK
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
Persistent session (Recommended)
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, set environment variables, 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!')")
Environment variables are set at creation and reach both commands and code.run:
with Sandbox.create(env={"TZ": "UTC"}) as sbx:
sbx.commands.run("date")
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.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vpod-0.8.5.tar.gz | 6.2 MB | Without provenance | Details for vpod-0.8.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vpod-0.8.5-py3-none-any.whl | Python 3 | none | any | Details for vpod-0.8.5-py3-none-any.whl |
Total release size: 12.5 MB
Release files / vpod-0.8.5.tar.gz
| Download URL | vpod-0.8.5.tar.gz |
|---|---|
| Size | 6.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c31383431eab553e88c3e7cc570fa9c0294ade77b45b6ea21d5c47aca37590f4
|
|
BLAKE2b-256 checksum How to use checksums |
5af06dc58d9bf1b47d29792cfd752c912e4d67536fccbf84660a70a240bf040d
|
| 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.5-py3-none-any.whl
| Download URL | vpod-0.8.5-py3-none-any.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6984644ffe256bc30d6fda267873a81a58767d4d1606cc8404cadde8104e5ab
|
|
BLAKE2b-256 checksum How to use checksums |
86ab2e265a7635ebfce94d1a4db404fa70421f0adcec2ca6dde5c8b455fc58a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|
Security for vpod 0.8.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.