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-sdk

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.6.1.tar.gz (53.6 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.6.1-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomputer_sdk-0.6.1.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opencomputer_sdk-0.6.1.tar.gz
Algorithm Hash digest
SHA256 b957d1993f4d8058f1eeaff82049fd6596d4027f62690dda2bcc44a0e79e672d
MD5 791e1965b3895ae1bb0e14c40669fa9c
BLAKE2b-256 454d9e557303270721e3ad6a050df21e57bf917cb445acdbdb93cbbfdb5441d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomputer_sdk-0.6.1.tar.gz:

Publisher: publish-python-sdk.yml on diggerhq/opencomputer

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

File details

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

File metadata

File hashes

Hashes for opencomputer_sdk-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b02aca52801e043d9dcce3935c9e9070a69d2ea6efa84056eb1bedb81d2256
MD5 17ba27edb7e1365bcc3e0dbe837a338e
BLAKE2b-256 1f64cf262d03f91de51e99bbb26bc5f5d70875503cfa3f85d5c28e2d6445aaf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomputer_sdk-0.6.1-py3-none-any.whl:

Publisher: publish-python-sdk.yml on diggerhq/opencomputer

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