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

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomputer_sdk-0.6.4.tar.gz
  • Upload date:
  • Size: 55.7 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.4.tar.gz
Algorithm Hash digest
SHA256 8b2add46ac2ff42d5c8cf3dde9f591b55fcfa0016382774431fb8e9cdeb71585
MD5 bdced8659656f759f34fda857bb5162c
BLAKE2b-256 5f3d21e67592d5eb5fea5025465720b83a51c191e9d9d7c5e5c59f97859921ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opencomputer_sdk-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5513ac61259d52109b44c7444ae48f58aa367c2d2a366aaf628103060aa78f77
MD5 2067e158fde2f1704ec4f1c5e514b2a1
BLAKE2b-256 1a41d091f997f55471f9c40e29294989c61e0b40e070ec53da13397e65559655

See more details on using hashes here.

Provenance

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