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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cwsandbox-0.26.0.tar.gz
Algorithm Hash digest
SHA256 541fbef6fd5cf7b70e2692bf3f35a2ae8f2a577e5caf29162dececb42e973616
MD5 e21d79e9cfa2df8d36c3423e3a956093
BLAKE2b-256 efd9540f20685c878f86f8588bff841618e1a125bfb13c8ba4071fe9e041477d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: cwsandbox-0.26.0-py3-none-any.whl
  • Upload date:
  • Size: 178.2 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.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88143a5959a93f1a0145a7897d57caabe9c488051e287f185da1a83451896105
MD5 3c7846a1661b61be8393d043d610caf0
BLAKE2b-256 6761ac962e3c59d3c349046d204a67c5f301b10ebab4c413b079862fd234a7d5

See more details on using hashes here.

Provenance

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