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

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomputer_sdk-0.4.7.tar.gz
  • Upload date:
  • Size: 30.3 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.7.tar.gz
Algorithm Hash digest
SHA256 5881616216119ba043eb92b2aea22e3337a47aeddfa77270342c63fff1ab74ce
MD5 0354d4cddb3749ac6866a30cbbf89426
BLAKE2b-256 05795517840a9df98f68ca4c185e0bc6ef77681a5405436b0c699b05c72df049

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opencomputer_sdk-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 40a0f3c40a421877d2e8e7f89595f57a3eee417ac3383c7f48c8765a0f23b7b6
MD5 e37faa56dbef78e1e0acbe46cd77421f
BLAKE2b-256 8cf96017154353a794544c71c5e504fa187b7e7d0dcad0d852570e3a7746b769

See more details on using hashes here.

Provenance

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