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 OPENCOMPUTER_API_URL https://app.opencomputer.dev
api_key OPENCOMPUTER_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.4.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.4.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomputer_sdk-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 98b30e76574bc2578c737b4b72007d5925aa63a42034fcd77cc7b2e39fe18ef0
MD5 55cfadbfffd628756964706118df0622
BLAKE2b-256 3476184d3f917afaab6c398c701eeac40ff88e40793279580f5f0b4a9492f8a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opencomputer_sdk-0.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2f5a5f83f38424e69ca3eded18c66ec08db2a95151f9d716264de24690e5a8
MD5 ff0975b17e10b1da21488dda98980ee6
BLAKE2b-256 df69d9288578c29399ed79ef278bee7df2683bf4f04acd0ad434fda54fea2854

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