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

Metadata

Release files for hotcell 0.1.20

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.20
File Size Uploaded
hotcell-0.1.20.tar.gz 13.4 kB Details

Built distribution (wheel)

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

Total release size: 26.7 kB

Release files / hotcell-0.1.20.tar.gz

Download URL hotcell-0.1.20.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e94928a6e4cd27fcfc1ddc7e2c3e5e666cc501e931d5b2103ea3cf2c6f6cc6eb
BLAKE2b-256 checksum
How to use checksums
0794df9d79fb7001c6bfb17594a0361f67364e1052e4eb5588b56024d0a61e02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 25, 2026.

Transparency log

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

Download URL hotcell-0.1.20-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c108657119b0dd280336a783212bf948e636fe079ed73df1376c81735f6ba8b0
BLAKE2b-256 checksum
How to use checksums
29e227cf677c909772c0b62416a99aa667b8d41ae37507b3ab1bad9f3764e8af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.20 This release

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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