Skip to main content
Pre-release

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

MimoBox Python SDK

PyO3 Python bindings for mimobox sandbox execution with context manager support.

Repository: https://github.com/showkw/mimobox

Architecture

mimobox-python is a thin Python wrapper over mimobox-sdk; Rust owns backend selection, isolation, lifecycle, streaming, snapshots, files, and HTTP proxying.

maturin develop -m crates/mimobox-python/Cargo.toml

Quick Example

from mimobox import Sandbox

with Sandbox(isolation="auto") as sandbox:
    result = sandbox.execute("echo hello", timeout=5.0)
    print(result.stdout)

Streaming output:

from mimobox import Sandbox

with Sandbox(isolation="os") as sandbox:
    for event in sandbox.stream_execute("printf 'a\\nb\\n'"):
        if event.stdout:
            print(event.stdout.decode(), end="")

API

API Purpose
execute, stream_execute Run commands normally or as events.
read_file, write_file Transfer sandbox files as bytes.
snapshot, from_snapshot, fork Capture, restore, or copy state.
http_request Use the whitelisted host HTTP proxy.
wait_ready, is_ready, close Manage lifecycle and readiness.
Isolation Meaning
auto Let mimobox choose the backend.
os Use the OS sandbox backend.
wasm Use the Wasm backend.
microvm Use the microVM backend.

Exceptions

SandboxError is the base exception; SandboxProcessError, SandboxHttpError, and SandboxLifecycleError derive from it.

License

MIT OR Apache-2.0

Metadata

Release files for mimobox 0.1.0a0

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

Built distributions (wheels)

Table of built distributions (wheels) for mimobox 0.1.0a0
File Interpreter ABI Platform
mimobox-0.1.0a0-cp313-abi3-macosx_11_0_arm64.whl CPython 3.13 abi3 macOS 11.0+ ARM64 Details
mimobox-0.1.0a0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details

Total release size: 2.3 MB

Release files / mimobox-0.1.0a0-cp313-abi3-macosx_11_0_arm64.whl

Download URL mimobox-0.1.0a0-cp313-abi3-macosx_11_0_arm64.whl
Size 351.7 kB
Tags CPython 3.13 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ac10dbab0b759e4d9ba9b8c1a70913e6104ddf3676f6fae475b9ccfd1b8b1fd0
BLAKE2b-256 checksum
How to use checksums
68fbdd31c82ce373cbbbcd1202c1eb025692cfc470f286d0265fac89d0e2a312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.1

Release files / mimobox-0.1.0a0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mimobox-0.1.0a0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
1a2278dddcbb70bf2f82bf351044189f7aed2704cc3705ebba3604fe237d8245
BLAKE2b-256 checksum
How to use checksums
cafb2117314cb551b2827f346300e3a9e5a37955b8405f62e5972af49a0f593e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.1

Release history Release notifications | RSS feed

This release

0.1.0a0 This release

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