Metadata-Version: 2.4
Name: miosa-sandbox
Version: 0.2.0
Summary: Compatibility imports for the canonical MIOSA Python SDK
Project-URL: Homepage, https://miosa.ai
Project-URL: Documentation, https://docs.miosa.ai/sdk/python
Project-URL: Repository, https://github.com/miosa-ai/miosa
Project-URL: Issues, https://github.com/miosa-ai/miosa/issues
Author-email: MIOSA <dev@miosa.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ai,code-execution,miosa,sandbox,sdk
Classifier: Development Status :: 7 - Inactive
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: miosa==1.3.5
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# 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

```bash
pip install miosa-sandbox
```

Version 0.2.0 requires the canonical `miosa==1.3.5` package.

## Compatibility API

```python
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:

```python
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.

## Migration

Replace `miosa-sandbox` with `miosa` and rename the client imports when convenient:

```python
from miosa import AsyncMiosa, Miosa
```

The canonical SDK documentation is at <https://miosa.ai/docs/sdks/python>.

## License

MIT
