Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrovm_sdk-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrovm_sdk-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for pyrovm_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53cf5a8ce8058bb6a6a40fb6f1032ef8c80e19d03728efc1d336fee821d0d8d1
MD5 f8acb8ba14010a32c81e78ecb16aaa09
BLAKE2b-256 c0c84341fd96c9d7e080d0671f474b1007d56012a3216b48d8f5aa7e4ebd29a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrovm_sdk-0.1.0.tar.gz:

Publisher: publish-sdk.yml on danievanzyl/pyro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyrovm_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ba48dd00bba4191f7da46a46b168360bf449d18598868711a902519ae70fdc7
MD5 8180edeaf9332e27df41f7545cfb8469
BLAKE2b-256 512ef93aaef51bc84706e0789b945346ec77b81aef3093ca4d082781e5b548ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrovm_sdk-0.1.0-py3-none-any.whl:

Publisher: publish-sdk.yml on danievanzyl/pyro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page