Metadata-Version: 2.4
Name: pyrovm-sdk
Version: 0.1.0
Summary: Python SDK for Pyro — open-source sandbox platform for AI agents
Project-URL: Homepage, https://github.com/danievanzyl/pyro
Project-URL: Repository, https://github.com/danievanzyl/pyro
Author: Danie van Zyl
License-Expression: MIT
Keywords: agents,ai,firecracker,microvm,sandbox
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: respx; extra == 'dev'
Description-Content-Type: text/markdown

# pyrovm-sdk

Python SDK for [Pyro](https://github.com/danievanzyl/pyro) — the open-source sandbox platform for AI agents.

## Install

```bash
pip install pyrovm-sdk
```

## Quickstart

```python
import asyncio
from pyro_sdk import Pyro

async def main():
    pyro = Pyro(api_key="pk_...", base_url="http://localhost:8080")

    async with await pyro.sandbox.create(image="python") as sb:
        result = await sb.run("print('Hello from Pyro!')")
        print(result.stdout)  # "Hello from Pyro!\n"

asyncio.run(main())
```

## Configuration

| Env var | Description |
|---------|-------------|
| `PYRO_API_KEY` | API key (or pass `api_key=` to constructor) |
| `PYRO_BASE_URL` | Server URL (default: `http://localhost:8080`) |

## API

### `Pyro(api_key=, base_url=, timeout=)`
Create a client. Reads from env vars if not provided.

### `pyro.sandbox.create(image=, timeout=, vcpu=, mem_mib=)`
Create a sandbox. Returns a `Sandbox` object.

### `sandbox.run(code, language=)`
Run code. Auto-detects language from image name.

### `sandbox.exec(command, env=, workdir=, timeout=)`
Execute a command. Returns `ExecResult(exit_code, stdout, stderr)`.

### `sandbox.write_file(path, content)`
Write a file into the sandbox.

### `sandbox.read_file(path)`
Read a file from the sandbox. Returns `bytes`.

### `sandbox.stop()`
Destroy the sandbox. Called automatically when using `async with`.
