Skip to main content

Python SDK for Mosaic Sandbox (MAR)

Project description

Mosaic Sandbox Python SDK

mosaic-sandbox is the Python SDK and CLI for Mosaic Sandbox, a Firecracker-based runtime for coding agents.

Install:

python -m pip install mosaic-sandbox

Authenticate once with the CLI:

mar auth --token msk_live_...
mar whoami

Run the CLI smoke test:

mar doctor
mar run --template node-20 node -v
mar ssh <sandbox-id> --print-command

Or run the one-command first-run check:

mar smoke

Python example:

from mosaic_sandbox import Sandbox

sbx = Sandbox.create(
    template="node-20",
    endpoint="https://sandbox.mosaicos.com",
    api_token="msk_live_..."
)

try:
    result = sbx.run_command("node -v")
    print(result.stdout)
    print(result.tti_ms)
finally:
    sbx.destroy()

Docs: https://sandbox.mosaicos.com/docs/

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

mosaic_sandbox-0.1.1.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

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

mosaic_sandbox-0.1.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file mosaic_sandbox-0.1.1.tar.gz.

File metadata

  • Download URL: mosaic_sandbox-0.1.1.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for mosaic_sandbox-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f8865b281f95973f02294b524ea877756a95c0fc8cf5594fe6c9d46cd5c39c7a
MD5 42f6141da60633127a321f1c5d9c9839
BLAKE2b-256 3e54d8a8fe5a41ee96df58bf0c0f7a7650dcf5e9d9ef20094e776a0e2933bad7

See more details on using hashes here.

File details

Details for the file mosaic_sandbox-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mosaic_sandbox-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for mosaic_sandbox-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78bc8520bf32ad44fe7cfe7fb6727de2fd36c377fbcc94631482529669108599
MD5 6cb292b0c137b475b27a599a27407741
BLAKE2b-256 2e1f2f889d499240c18a0f474b3e8ded4de77b05d07b025ad1e5a92e7dfff97e

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