Box Public API v1
Project description
ascii-box-sdk
Use Box from your application code.
Install
pip install ascii-box-sdk
Links
- SDK docs: https://docs.ascii.dev/box/sdks
- API reference: https://docs.ascii.dev/box/api/reference
- Dashboard: https://box.ascii.dev/dashboard
- API keys: https://box.ascii.dev/box/dashboard?tab=api-keys
Flow
- Create an API key in the Box dashboard.
- Create or resume a Box.
- Prompt the Box.
- Read events until the work is done.
- Open desktop access when you need browser or GUI visibility.
- 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_secretsreplaces the entire secret setup. Read the current setup first and send every env var and secret file that should remain.rotateApiKey/rotate_api_keyrotates 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ascii_box_sdk-0.0.10.tar.gz.
File metadata
- Download URL: ascii_box_sdk-0.0.10.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
313860f880bdd1b6d701d1b5e967b1c1393c98f10f3f418ed628e56ad8684cd1
|
|
| MD5 |
f8587d972d24e5889b4428fd1a5e9b2d
|
|
| BLAKE2b-256 |
2c0e80d58c4c4d21f27807de8fb738911999f9b4d757079111b3a41ecfc491a6
|
Provenance
The following attestation bundles were made for ascii_box_sdk-0.0.10.tar.gz:
Publisher:
release-box-sdks.yml on ariana-dot-dev/ariana-ide-private
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ascii_box_sdk-0.0.10.tar.gz -
Subject digest:
313860f880bdd1b6d701d1b5e967b1c1393c98f10f3f418ed628e56ad8684cd1 - Sigstore transparency entry: 1720192569
- Sigstore integration time:
-
Permalink:
ariana-dot-dev/ariana-ide-private@f631fcb2f5a8843a28385ed6aeb830aabb973390 -
Branch / Tag:
refs/tags/box-sdk-v0.0.10 - Owner: https://github.com/ariana-dot-dev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-box-sdks.yml@f631fcb2f5a8843a28385ed6aeb830aabb973390 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ascii_box_sdk-0.0.10-py3-none-any.whl.
File metadata
- Download URL: ascii_box_sdk-0.0.10-py3-none-any.whl
- Upload date:
- Size: 124.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
154ef9272d1acf9535fb98423b7f6749fd23bf7f95092d5b2ae02e0936b8eacb
|
|
| MD5 |
49e8a114913158ea684e5003429dc84b
|
|
| BLAKE2b-256 |
2e290e49e2585f6869813de6c1216e70a03435e4a4052e93eada0527fdb59aef
|
Provenance
The following attestation bundles were made for ascii_box_sdk-0.0.10-py3-none-any.whl:
Publisher:
release-box-sdks.yml on ariana-dot-dev/ariana-ide-private
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ascii_box_sdk-0.0.10-py3-none-any.whl -
Subject digest:
154ef9272d1acf9535fb98423b7f6749fd23bf7f95092d5b2ae02e0936b8eacb - Sigstore transparency entry: 1720193392
- Sigstore integration time:
-
Permalink:
ariana-dot-dev/ariana-ide-private@f631fcb2f5a8843a28385ed6aeb830aabb973390 -
Branch / Tag:
refs/tags/box-sdk-v0.0.10 - Owner: https://github.com/ariana-dot-dev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-box-sdks.yml@f631fcb2f5a8843a28385ed6aeb830aabb973390 -
Trigger Event:
push
-
Statement type: