Metadata-Version: 2.5
Name: planir
Version: 0.1.0b8
Summary: Official Python SDK for planir.io — hosted, hardware-isolated microVM runtimes with a stable public URL per runtime.
Project-URL: Homepage, https://planir.io
Project-URL: Repository, https://github.com/Planir-io/sdk
License-Expression: Apache-2.0
Keywords: agents,microvm,planir,runtime,sandbox,sdk
Requires-Python: >=3.10
Requires-Dist: connectrpc==0.11.1
Requires-Dist: httpx>=0.21.2
Requires-Dist: protobuf<8,>=7.35.1
Requires-Dist: pydantic>=2.0
Requires-Dist: typing-extensions>=4.0
Description-Content-Type: text/markdown

# planir

Official Python SDK for [planir.io](https://planir.io) — hosted, hardware-isolated
microVM runtimes with a stable public URL per runtime. Sync and async clients.

## Install

```sh
pip install planir
```

## Usage

```python
import os
from planir import PlanirClient

client = PlanirClient(token=os.environ["PLANIR_TOKEN"])

# List runtimes (one page; pass cursor=page.next_cursor for the next one)
page = client.runtimes.list()
for runtime in page.runtimes:
    print(runtime.id)

# Create a runtime
runtime = client.runtimes.create(request={"image": "ghcr.io/acme/agent:latest"})
print(runtime.urls)
```

The client defaults to `https://api.planir.io`; pass `base_url` to point elsewhere
(e.g. a mock server in tests). An async client is available as `AsyncPlanirClient`.
`client.runtimes.runtime(runtime.id).commands` and `.pty` expose the generated
streaming Process client. Commands use argv; no shell is added implicitly.
A custom `httpx_client` also requires `process_http_client`, because streaming Process
calls use Connect's native Pyqwest client.

## License

Apache-2.0
