Skip to main content

A Python client library for CoreWeave Sandbox

Project description

cwsandbox-client

A Python client library for CWSandboxes.

Documentation

See the documentation site for the full tutorial, guides, and API reference.

Quick Start

from cwsandbox import Sandbox

# Quick one-liner with factory method (sync/async hybrid API)
sb = Sandbox.run("echo", "Hello, World!")
sb.stop().result()  # Block for completion

# Context manager for automatic cleanup
with Sandbox.run("sleep", "infinity", container_image="python:3.11") as sb:
    result = sb.exec(["python", "-c", "print(2 + 2)"]).result()
    print(result.stdout)  # 4

# Also works in async contexts
async with Sandbox.run("sleep", "infinity") as sb:
    result = await sb.exec(["python", "-c", "print(2 + 2)"])
    print(result.stdout)  # 4

Development

See DEVELOPMENT.md for setup and workflow.

For code standards and commit guidelines, see CONTRIBUTING.md.

License

  • The CWSandbox Client library is licensed under the Apache-2.0 license.
  • The CWSandbox Client examples are licensed under the BSD-3-Clause license.

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

cwsandbox-0.24.0.tar.gz (429.8 kB view details)

Uploaded Source

Built Distribution

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

cwsandbox-0.24.0-py3-none-any.whl (148.3 kB view details)

Uploaded Python 3

File details

Details for the file cwsandbox-0.24.0.tar.gz.

File metadata

  • Download URL: cwsandbox-0.24.0.tar.gz
  • Upload date:
  • Size: 429.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cwsandbox-0.24.0.tar.gz
Algorithm Hash digest
SHA256 067a95696d8236197675e3127e75813b10ddad0fbff5e63c7a96c274e7f4b4cc
MD5 737921408afd20c8dcb6c84df4a8627e
BLAKE2b-256 2684b77bd2e551809251f9cd39d9aac6c50410202566ff51f9bf416ced462d57

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwsandbox-0.24.0.tar.gz:

Publisher: release.yaml on coreweave/cwsandbox-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cwsandbox-0.24.0-py3-none-any.whl.

File metadata

  • Download URL: cwsandbox-0.24.0-py3-none-any.whl
  • Upload date:
  • Size: 148.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cwsandbox-0.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81fb174c8fe692ef46c9884e58d8062c0f0d2a56783790fb99a8ff4b31d84328
MD5 11d49fb99e50619c37c3e1fca95dc870
BLAKE2b-256 cd2ece3063c8e0b3f3c6a9e8a81bc39ff77ae38e353ad396cb299afc7c05e5a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwsandbox-0.24.0-py3-none-any.whl:

Publisher: release.yaml on coreweave/cwsandbox-client

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