Python SDK for Pyro — open-source sandbox platform for AI agents
Project description
pyrovm-sdk
Python SDK for Pyro — the open-source sandbox platform for AI agents.
Install
pip install pyrovm-sdk
Quickstart
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrovm_sdk-0.1.0.tar.gz.
File metadata
- Download URL: pyrovm_sdk-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53cf5a8ce8058bb6a6a40fb6f1032ef8c80e19d03728efc1d336fee821d0d8d1
|
|
| MD5 |
f8acb8ba14010a32c81e78ecb16aaa09
|
|
| BLAKE2b-256 |
c0c84341fd96c9d7e080d0671f474b1007d56012a3216b48d8f5aa7e4ebd29a4
|
Provenance
The following attestation bundles were made for pyrovm_sdk-0.1.0.tar.gz:
Publisher:
publish-sdk.yml on danievanzyl/pyro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrovm_sdk-0.1.0.tar.gz -
Subject digest:
53cf5a8ce8058bb6a6a40fb6f1032ef8c80e19d03728efc1d336fee821d0d8d1 - Sigstore transparency entry: 1175245178
- Sigstore integration time:
-
Permalink:
danievanzyl/pyro@4a380e8f27b2e875484e0bab19d9e30eaf5cee2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/danievanzyl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@4a380e8f27b2e875484e0bab19d9e30eaf5cee2f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrovm_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyrovm_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ba48dd00bba4191f7da46a46b168360bf449d18598868711a902519ae70fdc7
|
|
| MD5 |
8180edeaf9332e27df41f7545cfb8469
|
|
| BLAKE2b-256 |
512ef93aaef51bc84706e0789b945346ec77b81aef3093ca4d082781e5b548ab
|
Provenance
The following attestation bundles were made for pyrovm_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on danievanzyl/pyro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrovm_sdk-0.1.0-py3-none-any.whl -
Subject digest:
8ba48dd00bba4191f7da46a46b168360bf449d18598868711a902519ae70fdc7 - Sigstore transparency entry: 1175245504
- Sigstore integration time:
-
Permalink:
danievanzyl/pyro@4a380e8f27b2e875484e0bab19d9e30eaf5cee2f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/danievanzyl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@4a380e8f27b2e875484e0bab19d9e30eaf5cee2f -
Trigger Event:
push
-
Statement type: