Python client for the hotcell self-hostable agent sandbox daemon
Project description
hotcell (Python SDK)
Dependency-free Python client for the hotcell self-hostable agent sandbox daemon. Mirrors the TypeScript SDK surface (snake_cased) so the same workflows work from either language.
from hotcell import HotcellClient
client = HotcellClient(endpoint="http://127.0.0.1:4750") # or $HOTCELL_ENDPOINT
sandbox = client.get_sandbox() # create a fresh sandbox
# run a command
result = sandbox.exec("python3 -c 'print(2 + 2)'")
print(result.stdout, result.exit_code) # "4\n" 0
# files
sandbox.write_file("/workspace/hi.txt", "hello")
print(sandbox.read_file("/workspace/hi.txt")) # "hello"
# stateful code interpreter
ctx = sandbox.create_code_context(language="python")
ctx.run_code("x = 21")
print(ctx.run_code("x * 2").results[0].text) # "42"
# metrics + cost
m = sandbox.metrics()
print(m.cost.total, m.usage.cpu_seconds)
sandbox.destroy()
Standard library only (urllib, json) — no third-party dependencies. Requires
Python ≥ 3.9 and a running hotcell daemon.
Surface
HotcellClient: get_sandbox, list, health, info, list_backups, delete_backup.
Sandbox: exec, exec_stream, stop, start, destroy, metrics,
write_file, read_file, mkdir, list_files, watch, start_process,
list_processes, kill_process, stream_logs, wait_for_port, expose_port,
unexpose_port, list_exposed_ports, set_env_vars, get_env_vars,
create_session, list_sessions, create_backup, restore_backup,
list_backups, create_code_context, list_code_contexts, run_code.
Session: exec, exec_stream, set_env_vars, destroy.
CodeContext: run_code, destroy.
Project details
Release history Release notifications | RSS feed
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 hotcell-0.1.2.tar.gz.
File metadata
- Download URL: hotcell-0.1.2.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac2df2f5f4509c0341880cd07ed8e4e71f3c0dae37b9fcc7e1f29c07089df9ea
|
|
| MD5 |
0a908d7ae59b1c31c271b4fd241e42f0
|
|
| BLAKE2b-256 |
57cea421cdaa9f4d4e6a767d7c1c90e96490401a94b4e6058414ac9c0331b74b
|
Provenance
The following attestation bundles were made for hotcell-0.1.2.tar.gz:
Publisher:
release.yml on sinameraji/hotcell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hotcell-0.1.2.tar.gz -
Subject digest:
ac2df2f5f4509c0341880cd07ed8e4e71f3c0dae37b9fcc7e1f29c07089df9ea - Sigstore transparency entry: 2189133576
- Sigstore integration time:
-
Permalink:
sinameraji/hotcell@703dbd91738336c3fe64a06e613b6b9fbb6cbf5d -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/sinameraji
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@703dbd91738336c3fe64a06e613b6b9fbb6cbf5d -
Trigger Event:
push
-
Statement type:
File details
Details for the file hotcell-0.1.2-py3-none-any.whl.
File metadata
- Download URL: hotcell-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.4 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 |
cd788e625b49870224680d08e0757ee0377dd14dd7ed28b7f3dd3b2d3349e849
|
|
| MD5 |
ca48587ada40d93801c8cd3cee586401
|
|
| BLAKE2b-256 |
d798dc40b65dc51eb9512ad751ea1127af56b9c39c049abf85128e2faca2b320
|
Provenance
The following attestation bundles were made for hotcell-0.1.2-py3-none-any.whl:
Publisher:
release.yml on sinameraji/hotcell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hotcell-0.1.2-py3-none-any.whl -
Subject digest:
cd788e625b49870224680d08e0757ee0377dd14dd7ed28b7f3dd3b2d3349e849 - Sigstore transparency entry: 2189133588
- Sigstore integration time:
-
Permalink:
sinameraji/hotcell@703dbd91738336c3fe64a06e613b6b9fbb6cbf5d -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/sinameraji
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@703dbd91738336c3fe64a06e613b6b9fbb6cbf5d -
Trigger Event:
push
-
Statement type: