Skip to main content

ascii-box-sdk

Use Box from your application code.

Install

pip install ascii-box-sdk

Links

Flow

  1. Create an API key in the Box dashboard.
  2. Create or resume a Box.
  3. Prompt the Box.
  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 Box according to your retention policy.

Notes

  • Put cleanup in finally: stop/archive or delete Boxes you create for tests.
  • Treat API key secrets, Box 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 ascii_box_sdk import ApiClient, Configuration
from ascii_box_sdk.api.box_api import BoxApi
from ascii_box_sdk.models.create_box_request import CreateBoxRequest
from ascii_box_sdk.models.prompt_request import PromptRequest
from ascii_box_sdk.models.update_box_request import UpdateBoxRequest

config = Configuration(
    host=os.getenv("BOX_BASE_URL", "https://ascii.dev/api/box/v1"),
    access_token=os.environ["BOX_API_KEY"],
)

box_id = None
with ApiClient(config) as client:
    box = BoxApi(client)

    try:
        created = box.create(CreateBoxRequest(ttl_seconds=1800))
        box_id = created.box.id

        box.update(box_id, UpdateBoxRequest(name="sdk-demo"))

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

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

        events = box.events(box_id)
        print(events.events)
    finally:
        if box_id:
            box.stop(box_id)

License

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

Download files

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

Source Distribution

ascii_box_sdk-0.0.29.tar.gz (91.5 kB view details)

Uploaded Source

Built Distribution

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

ascii_box_sdk-0.0.29-py3-none-any.whl (192.1 kB view details)

Uploaded Python 3

File details

Details for the file ascii_box_sdk-0.0.29.tar.gz.

File metadata

  • Download URL: ascii_box_sdk-0.0.29.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ascii_box_sdk-0.0.29.tar.gz
Algorithm Hash digest
SHA256 b87b43348ebc401eca843f8725440a1570c64b099fe6911d4e29bbaa862880da
MD5 5df9b9a6c138cb4593350c026177325e
BLAKE2b-256 72de55dec9216bd43ddb52f3355f06af376f2ae3dd53d127a18595009821c903

See more details on using hashes here.

Provenance

The following attestation bundles were made for ascii_box_sdk-0.0.29.tar.gz:

Publisher: release-box-sdks.yml on ariana-dot-dev/ariana-ide-private

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ascii_box_sdk-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: ascii_box_sdk-0.0.29-py3-none-any.whl
  • Upload date:
  • Size: 192.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ascii_box_sdk-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 6dd96fc2a2f9f750193d72789500fa87c2aed3e9fedd1edb360f17468bf68ec4
MD5 1c79b2e70e9dd7a1c613b2e81dde5ec5
BLAKE2b-256 4861a6b5c2a0bb4c0b5138410f2b03d34e086d1857c37798fabaf6586046a386

See more details on using hashes here.

Provenance

The following attestation bundles were made for ascii_box_sdk-0.0.29-py3-none-any.whl:

Publisher: release-box-sdks.yml on ariana-dot-dev/ariana-ide-private

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.37

2 files

0.0.36

2 files

0.0.35

2 files

0.0.33

2 files

0.0.31

2 files

This release

0.0.29 This release

2 files

0.0.25

2 files

0.0.22

2 files

0.0.20

2 files

0.0.18

2 files

0.0.16

2 files

0.0.14

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.7

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

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