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.2.tar.gz (54.4 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.2-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomputer_sdk-0.6.2.tar.gz
  • Upload date:
  • Size: 54.4 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.2.tar.gz
Algorithm Hash digest
SHA256 8e66c44ac56b8dd38193eaf9a930dcf7d218019154c6b5a896c21d1cc69f63ed
MD5 9a7dc9c62db40026951d797b0e295bf6
BLAKE2b-256 4dd825ed9277e75d9584c524df7c2cb3693f039c7d0b4c87f04f4af0f8b795bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomputer_sdk-0.6.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for opencomputer_sdk-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 14702e9d97185c14286cec3bac0a63f46390213625fe05c20a2eeaea4deead2b
MD5 91f7b051a551b260bc84d0a82264cbd0
BLAKE2b-256 a62ccaf54556ed85f0ac0f6a7a09c15b390fcc7e3f6aa735700774e3653a75d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for opencomputer_sdk-0.6.2-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