Skip to main content

boat-sdk

Use Boat from your application code.

Install

pip install boat-sdk

Flow

  1. Create an API key in the Boat dashboard.
  2. Create or resume a sandbox.
  3. Prompt the sandbox.
  4. Read events until the work is done.
  5. Open desktop access when you need browser or GUI visibility.
  6. Stop, resume, fork, or delete the sandbox according to your retention policy.

Notes

  • Put cleanup in finally: stop/archive or delete sandboxes you create for tests.
  • Treat API key secrets, Boat secrets, SSH keys, and desktop stream URLs as sensitive.
  • updateSecrets / update_secrets replaces the entire secret setup. Read the current setup first and send every env var and secret file that should remain.
  • rotateApiKey / rotate_api_key rotates the raw secret in place. Store the returned secret immediately; it is shown once.
  • Repository selection is idempotent. Selecting an already-selected repository updates its base branch.

Example

import os
import time

from boat_sdk import ApiClient, Configuration
from boat_sdk.api.boat_api import BoatApi
from boat_sdk.models.create_sandbox_request import CreateSandboxRequest
from boat_sdk.models.prompt_request import PromptRequest
from boat_sdk.models.update_sandbox_request import UpdateSandboxRequest

config = Configuration(
    host=os.getenv("BOAT_BASE_URL", "https://boat.dev/api/v1"),
    access_token=os.environ["BOAT_API_KEY"],
)

sandbox_id = None
with ApiClient(config) as client:
    sandbox = BoatApi(client)

    try:
        created = sandbox.create(CreateSandboxRequest(ttl_seconds=1800))
        sandbox_id = created.sandbox.id

        sandbox.update(sandbox_id, UpdateSandboxRequest(name="sdk-demo"))

        while sandbox.get(sandbox_id).sandbox.state not in {"ready", "idle"}:
            time.sleep(2)

        sandbox.prompt(
            sandbox_id,
            PromptRequest(
                provider="codex",
                prompt="Inspect the repository and summarize the test command.",
            ),
        )

        events = sandbox.events(sandbox_id)
        print(events.events)
    finally:
        if sandbox_id:
            sandbox.stop(sandbox_id)

License

This SDK is MIT licensed. Boat, the Boat API, the Boat CLI, and the sandbox product are proprietary.

Release files for boat-sdk 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boat-sdk 1.0.0
File Size Uploaded
boat_sdk-1.0.0.tar.gz 123.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for boat-sdk 1.0.0
File Interpreter ABI Platform
boat_sdk-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 388.9 kB

Release files / boat_sdk-1.0.0.tar.gz

Download URL boat_sdk-1.0.0.tar.gz
Size 123.0 kB
Tags Source
SHA-256 checksum
How to use checksums
96c53ac65cd40f8476fea5b92b70584c86a8d8809eabfe46cb9214dfd3fb6ef8
BLAKE2b-256 checksum
How to use checksums
f3dc18b92836272e8f74f0608ceda2a05a75af8f423f78badf223fc38e686ba8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / boat_sdk-1.0.0-py3-none-any.whl

Download URL boat_sdk-1.0.0-py3-none-any.whl
Size 265.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78109641834e956e01a1ef838730a8b8bf298601fa1b5a2f458637e5a48759e5
BLAKE2b-256 checksum
How to use checksums
408c7dd27391470c1a11fba436f65259ef98ef2f190ebf2e2b0dceff345d20cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release 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