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.1

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.1
File Size Uploaded
boat_sdk-1.0.1.tar.gz 133.8 kB Details

Built distribution (wheel)

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

Total release size: 421.9 kB

Release files / boat_sdk-1.0.1.tar.gz

Download URL boat_sdk-1.0.1.tar.gz
Size 133.8 kB
Tags Source
SHA-256 checksum
How to use checksums
051158ec0afb21449ef719b881835834425a906b5560e95cb1e778d7529e8148
BLAKE2b-256 checksum
How to use checksums
441a857f47b40b53e02917fe1beb21065bfc4e497c3376067ccb49df4d63b3d6
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 25, 2026.

Transparency log

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

Download URL boat_sdk-1.0.1-py3-none-any.whl
Size 288.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b2d57d237b98aad08edcbb5864dd14c7bb14f072cb7649ef8198c1340d1d3e6
BLAKE2b-256 checksum
How to use checksums
36c5359c55be02fe622aa35fbebdbac2cef7976b113e97b2c2c2f68dbbfcd2ab
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 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

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