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.8.tar.gz (33.2 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.8-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for opencomputer_sdk-0.4.8.tar.gz
Algorithm Hash digest
SHA256 87648ac1c422e7648441e0a687aaaa750df2f1e2ac09009eb585e18c9fb8c1a7
MD5 1919549c0358f02accfd618265cce090
BLAKE2b-256 63d37b6fcf9f3f84b86a129fe19c29746e19d0032df0feed750c4d7c71d77f50

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opencomputer_sdk-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b341170d5c0f8f9d05f70810b97f7754e3ba93c7983139d9f4c4d669bb50a545
MD5 8789d0bf44dcf6a729ca772815895819
BLAKE2b-256 4726a75b1078871f16f9126e27b04d7b5daf612c5032bfc1d11c8cae24c81a05

See more details on using hashes here.

Provenance

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