Skip to main content

Python SDK for Watasu

Project description

Watasu Python SDK

Python SDK for Watasu.

Install

pip install watasu

Set WATASU_API_KEY before using the SDK.

Usage

from watasu import Sandbox

sbx = Sandbox.create()
sbx.files.write("/home/user/a.py", "print(2 + 2)")
result = sbx.commands.run("python /home/user/a.py")
print(result.stdout)
sbx.kill()

Sandbox.create and Sandbox.connect return only after the Watasu API supplies a usable data-plane session. The SDK does not poll sandbox readiness.

Async API

from watasu import AsyncSandbox


async def main() -> None:
    sbx = await AsyncSandbox.create()
    await sbx.kill()

Unsupported compatibility surfaces raise explicit not-implemented errors instead of silently falling back to client-side polling.

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

watasu-0.1.2.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watasu-0.1.2-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file watasu-0.1.2.tar.gz.

File metadata

  • Download URL: watasu-0.1.2.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for watasu-0.1.2.tar.gz
Algorithm Hash digest
SHA256 93a06e4a89b8f324dc99a45914e45e5e9d5cd6c3562a371968103c2d030575b8
MD5 fe63f12401cb112658a1fe280be51a6e
BLAKE2b-256 7d80ec05c41bb5501b8f9152688c858e5411766657d79802440c23f87c743cdf

See more details on using hashes here.

File details

Details for the file watasu-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: watasu-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for watasu-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc1c75bd74851794ccf4ec1c610d304acef126d69dadd53dfaa0b932b3c9b48
MD5 8d080909e701f07cf987606caaefd4b4
BLAKE2b-256 7921961b14aef7c0e4c14c7ae5795fa70f18d18fcdb52517ecc78a552b55daa3

See more details on using hashes here.

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