Skip to main content

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, capacity, list_backups, delete_backup.

Sandbox: exec, exec_stream, stop, start, pause, 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, create_egress_token, list_egress_tokens, revoke_egress_token.

Session: exec, exec_stream, set_env_vars, destroy. CodeContext: run_code, destroy.

Metadata

Release files for hotcell 0.1.36

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

Source distribution (sdist)

Source distribution for hotcell 0.1.36
File Size Uploaded Provenance Actions
hotcell-0.1.36.tar.gz 17.8 kB With provenance Details for hotcell-0.1.36.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hotcell 0.1.36
File Interpreter ABI Platform Actions
hotcell-0.1.36-py3-none-any.whl Python 3 none any Details for hotcell-0.1.36-py3-none-any.whl

Total release size: 35.5 kB

Release files / hotcell-0.1.36.tar.gz

Download URL hotcell-0.1.36.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa1fbb4c9c1e18dfab25b42399bd1b2b87c7eae20210018479e03581a0f98db1
BLAKE2b-256 checksum
How to use checksums
9b0beeca68d890f86b831e1d2048310c1ac07d6281db3f505c6e5cccdb1501e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Release files / hotcell-0.1.36-py3-none-any.whl

Download URL hotcell-0.1.36-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7e2c0fe8cf90d6683d790983a94a65b55a5c729883bc3c0e49729fc39a8a00f
BLAKE2b-256 checksum
How to use checksums
d983daa3a1f2589f7a5c902a0231c42f0b1e5396e2c2ff3832561368f5d4ce5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Security for hotcell 0.1.36

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hotcell-0.1.36.tar.gz

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 Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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