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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cwsandbox-0.11.1.tar.gz
Algorithm Hash digest
SHA256 ff4657d44b8846271ea6d1cf3b68f36338940b12e6a8f1bbfbf99ec2716e1530
MD5 7e78393b4b2e588e9aebf28a5a08f9ec
BLAKE2b-256 654c6c7ff7c40a9296c90b84cd97d1a0e31c21fc4f50d8c0890157b206334a5d

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for cwsandbox-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1fbc9e9f597fb944907859e9349e96d6833a785be3cfe15b785f180953002a0
MD5 02e75438c7580a9913a47a02e2962348
BLAKE2b-256 e6bba6cdf4a2e948e0fe15a7de60567d71aa2ed30a383404ce9b0d5be007be1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwsandbox-0.11.1-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