Skip to main content

solari-sandbox (Python)

Python SDK for Solari Sandboxes — fast, ephemeral code sandboxes (micro-VMs) with a code interpreter, filesystem, ports, and git. Mirrors the TypeScript @solarisdk/sandbox package.

Install

pip install solari-sandbox

Quickstart

import asyncio, os
from solari_sandbox import SandboxClient

async def main():
    client = SandboxClient(api_key=os.environ["SOLARI_API_KEY"])
    sb = await client.create(template="base")
    await sb.connect()
    result = await sb.run_code("print(6 * 7)")
    print(result.stdout)                      # -> 42
    await sb.kill()

asyncio.run(main())

SandboxClient(...) accepts api_key, base_url (default https://api.getsolari.com), and call_timeout_ms. The same slr_live_… key authenticates against both the browser and desktop/sandbox APIs.

Docs: https://getsolari.com

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solari_sandbox-0.2.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

solari_sandbox-0.2.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file solari_sandbox-0.2.1.tar.gz.

File metadata

  • Download URL: solari_sandbox-0.2.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for solari_sandbox-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e858e2267cef483ccf82f9c41cf148fa074ef930325a42fb51179a7b05ef7320
MD5 bea3ecf12f5eab03be0bc4ddded8125d
BLAKE2b-256 0a2d404d0d3f14eb2f7ac3af23022694ca7520f62b5c9aec432295673c58c5a1

See more details on using hashes here.

File details

Details for the file solari_sandbox-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: solari_sandbox-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for solari_sandbox-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 945655e3c6d78c54f544081b93890e5a926e701533fc0c3344fe71cedfb91123
MD5 0f70f3cc6998f58a7c599e6e27748ad5
BLAKE2b-256 3defd3f0ac5febd373aef30ceba44ee6127cbcf7757b53e36639250acbbbf3fe

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page