Skip to main content

WBX Sandbox – Python SDK

Python SDK for WBX Sandbox: isolated cloud sandboxes for AI agents and code execution. Each sandbox is a Firecracker microVM with its own Linux kernel, disk and network rules. No dependencies – only the Python standard library (Python 3.9+).

Install

pip install wbxsandbox

Configure

Create an API key in the portal (API keys) and set it in the environment:

export WBXSANDBOX_API_KEY=...
# optional, defaults to https://sandbox.wbx.cz
export WBXSANDBOX_URL=https://sandbox.wbx.cz

Both can also be passed as url= and api_key= arguments.

Quick start

from wbxsandbox import Sandbox

with Sandbox.create(template="base", timeout=300) as sb:
    r = sb.run("python3 -c 'print(1 + 1)'")
    print(r.exit_code, r.stdout)          # 0 "2\n"
    sb.files.write("/home/user/data.txt", "hello")
    print(sb.files.read_text("/home/user/data.txt"))
# the sandbox is destroyed when the block ends

A named sandbox that falls asleep instead of being destroyed – its files are there next time:

sb = Sandbox.create(template="base", name="my-project", on_timeout="pause", idle_timeout=600)
sb.files.write("/home/user/notes.txt", "kept while asleep")
sb.sleep()                                   # files kept, programs stop, no compute billed
sb = Sandbox.create(name="my-project")       # same sandbox, woken up

Background jobs and batches:

from wbxsandbox import run_job

job = run_job(command="python3 -c 'print(42)'", template="base", timeout_seconds=600)
job.wait()
print(job.summary()["status"])

Signed execution receipts – after the job ends, WBX signs its receipt (Ed25519): command, exact template build, input and output file checksums. Anyone with the public key can check it was not edited (pip install "wbxsandbox[verify]"):

from wbxsandbox import receipt_keys, verify_receipt

signed = job.signed_receipt()                     # keep or send the whole envelope
key = receipt_keys()[0]["public_key"]             # pin this key instead of fetching it each time
receipt = verify_receipt(signed, key)["execution_receipt"]   # ValueError if anything was changed
print(receipt["template_build"]["image_digest"], receipt["artifacts"])

The signature proves WBX issued the receipt unchanged – not that the computation could not have been altered.

IPv6 – the sandbox gets its own public IPv6 address ("dual", or "ipv6" for IPv6-only internet):

with Sandbox.create(template="base", ip="dual") as sb:
    print(sb.ipv6)

Interactive terminal in a running sandbox (installed as the wbx command):

wbx connect sb_...

Behind an HTTP proxy, set HTTPS_PROXY – the terminal connects through it.

Documentation: https://sandbox.wbx.cz/docs · Pricing: https://sandbox.wbx.cz/pricing

Versioning

The SDK has its own version. Its major.minor follows the platform release line (SDK 0.15.x works with platform 0.15.x); the patch number is raised only when the SDK itself changes. pyproject.toml and wbxsandbox.__version__ always carry the same version (checked by tests/test_sdk.py).

Tests

cd sdk/python && python3 -m unittest discover -s tests

The tests do not need network access.

License

MIT – see LICENSE.

Metadata

Release files for wbxsandbox 0.15.6

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

Source distribution (sdist)

Source distribution for wbxsandbox 0.15.6
File Size Uploaded Provenance Actions
wbxsandbox-0.15.6.tar.gz 27.2 kB With provenance Details for wbxsandbox-0.15.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wbxsandbox 0.15.6
File Interpreter ABI Platform Actions
wbxsandbox-0.15.6-py3-none-any.whl Python 3 none any Details for wbxsandbox-0.15.6-py3-none-any.whl

Total release size: 48.7 kB

Release files / wbxsandbox-0.15.6.tar.gz

Download URL wbxsandbox-0.15.6.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
78b3baa17ce593c8db1cba55895c15a72eac36d278f82313a85283e81dd83256
BLAKE2b-256 checksum
How to use checksums
a70234568148b81e7c9cc892d656378cfe60c7a808bff7b632fa5591590f9049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / wbxsandbox-0.15.6-py3-none-any.whl

Download URL wbxsandbox-0.15.6-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2facf212083436a9b1eb97ba5accdbd165513b6eb120a48308e78699fb2c136a
BLAKE2b-256 checksum
How to use checksums
ecc3f3b1da421ed7a53fe3e210a6a7ed14a5fc68bd7826296602da9bc13b25b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for wbxsandbox 0.15.6

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wbxsandbox-0.15.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

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.

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