Metadata-Version: 2.4
Name: opencomputer-sdk
Version: 0.4.5
Summary: Python SDK for OpenComputer - cloud sandbox platform
Project-URL: Homepage, https://github.com/diggerhq/opensandbox
Project-URL: Repository, https://github.com/diggerhq/opensandbox
Project-URL: Documentation, https://github.com/diggerhq/opensandbox/tree/main/sdks/python
Project-URL: Issues, https://github.com/diggerhq/opensandbox/issues
Author: OpenComputer
License-Expression: MIT
Keywords: cloud,code-execution,containers,opencomputer,sandbox
Classifier: Development Status :: 3 - Alpha
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: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: websockets>=12.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# opencomputer

Python SDK for [OpenComputer](https://github.com/diggerhq/opensandbox) — cloud sandbox platform.

## Install

```bash
pip install opencomputer
```

## Quick Start

```python
import asyncio
from opencomputer import Sandbox

async def main():
    sandbox = await Sandbox.create(template="base")

    # Execute commands
    result = await sandbox.commands.run("echo hello")
    print(result.stdout)  # "hello\n"

    # Read and write files
    await sandbox.files.write("/tmp/test.txt", "Hello, world!")
    content = await sandbox.files.read("/tmp/test.txt")

    # Clean up
    await sandbox.kill()
    await sandbox.close()

asyncio.run(main())
```

## Configuration

| Parameter  | Env Variable            | Default                 |
|------------|------------------------|-------------------------|
| `api_url`  | `OPENCOMPUTER_API_URL`  | `https://app.opencomputer.dev` |
| `api_key`  | `OPENCOMPUTER_API_KEY`  | (none)                  |

## License

MIT
