Skip to main content

Python SDK for OpenComputer - cloud sandbox platform

Project description

opencomputer

Python SDK for OpenComputer — cloud sandbox platform.

Install

pip install opencomputer

Quick Start

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 OPENSANDBOX_API_URL https://app.opencomputer.dev
api_key OPENSANDBOX_API_KEY (none)

License

MIT

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

opencomputer_sdk-0.3.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

opencomputer_sdk-0.3.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file opencomputer_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: opencomputer_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for opencomputer_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5204afaf76601d8acd15038dbd6d07c884e3d19a61e4307d6eaf14f39907fcf7
MD5 2f8ffbcbfab8fbe5230aec90af2dffe0
BLAKE2b-256 cbc3a0ea927434c6fafe8531d46a796b348928c038619ced12cfb6738cdfc62b

See more details on using hashes here.

File details

Details for the file opencomputer_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: opencomputer_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for opencomputer_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 962543794feca5d6bf846c86721f0d1083a9fd05a3c1ab55ec298f44dca8ab9e
MD5 953e8e8333040ee9648ce65ca44afeeb
BLAKE2b-256 551a1dae897d6795d25a657d800bb528deea5c3825d2205e456c62bcbeba15e4

See more details on using hashes here.

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