miosa-sandbox
miosa-sandbox is the compatibility package for applications that still import miosa_sandbox.
It delegates sandbox, computer, transport, error, and response behavior to the canonical miosa Python SDK.
New applications should install and import miosa directly.
Install
pip install miosa-sandbox
Version 0.2.0 requires the canonical miosa==1.3.5 package.
Compatibility API
from miosa_sandbox import MIOSA
with MIOSA(api_key="msk_...") as client:
with client.sandboxes.create() as sandbox:
result = sandbox.exec("python3 -c 'print(1 + 1)'")
print(result.stdout)
MIOSA and AsyncMIOSA preserve the legacy class names.
Returned handles are the canonical miosa.resources.sandboxes.Sandbox and AsyncSandbox classes.
All sandbox execution, file, lifecycle, usage, and response decoding behavior therefore comes from miosa.
When no size or exact resource tuple is supplied, this compatibility package requests the canonical small sandbox contract.
The small contract is 2 vCPU, 4096 MiB memory, and 10240 MiB disk.
Canonical ownership selectors can be passed directly:
sandbox = client.sandboxes.create(
workspace_id="workspace_123",
project_id="project_123",
external_user_id="customer_123",
)
Ownership fields, size, resource_contract, and usage() are exposed on sync and async sandbox handles.
Runtime selection
Every sandbox create runs on a runtime backend. Pass runtime= to
sandboxes.create() to pin it explicitly:
sandbox = client.sandboxes.create(runtime="firecracker") # full microVM (default)
sandbox = client.sandboxes.create(runtime="soma") # fastest start for supported Linux images
sandbox = client.sandboxes.create(runtime="auto") # let the platform pick
runtime= |
wire runtime_profile |
|---|---|
firecracker |
standard |
soma |
soma |
auto |
auto |
The selector travels on the wire as runtime_profile; runtime is never sent
as a key of its own. Omit runtime= to let the platform apply its default
(firecracker). An unrecognized value raises ValueError before any request is
made. runtime= is also accepted by create_agent_workspace() and
get_or_create(), which build a create body too.
Check the live gate state before asking for a runtime - a requested runtime that is currently unavailable is rejected by the control plane:
for runtime in client.sandboxes.runtimes.list():
print(runtime["id"], runtime["available"], runtime["unavailable_reason"])
# {'id': 'firecracker', 'runtime_profile': 'standard', 'available': True, ...}
# {'id': 'soma', 'runtime_profile': 'soma', 'available': False,
# 'unavailable_reason': 'GLOBAL_GATE_CLOSED', ...}
client.runtimes.list() (the canonical accessor) returns the same catalog.
Each entry is a SandboxRuntimeInfo with id, runtime_profile, label,
description, default, available, unavailable_reason, and a
capabilities block (browser, network_egress, persistence, pause,
gpu, max_shape). unavailable_reason is null when available is true,
otherwise a machine code such as GLOBAL_GATE_CLOSED or ORG_RESTRICTED.
The async client mirrors this exactly:
sandbox = await client.sandboxes.create(runtime="soma")
runtimes = await client.sandboxes.runtimes.list()
Migration
Replace miosa-sandbox with miosa and rename the client imports when convenient:
from miosa import AsyncMiosa, Miosa
The canonical SDK documentation is at https://miosa.ai/docs/sdks/python.
License
MIT
Metadata
Release files for miosa-sandbox 0.2.2
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 |
|---|---|---|---|---|
| miosa_sandbox-0.2.2.tar.gz | 7.1 kB | Without provenance | Details for miosa_sandbox-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| miosa_sandbox-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for miosa_sandbox-0.2.2-py3-none-any.whl |
Total release size: 16.6 kB
Release files / miosa_sandbox-0.2.2.tar.gz
| Download URL | miosa_sandbox-0.2.2.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffd89b5e8c7bba0287fdd90797227866a8ec4b00aeda0950303da58f46401049
|
|
BLAKE2b-256 checksum How to use checksums |
73d89b397ab188fcbc8ab1a4b2f54839a82a0af7cb559ffe547e355f1da68ab1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / miosa_sandbox-0.2.2-py3-none-any.whl
| Download URL | miosa_sandbox-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
038e568fadbc3a4ed6e047ab8729beb1bb4b13a7f26dd734880bd879bbb2a1a5
|
|
BLAKE2b-256 checksum How to use checksums |
21ee0ce97c0e49806b9085c5ff313b7209e19a4b7a8bb549c7c7003c9dadcd2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Security for miosa-sandbox 0.2.2
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.