Skip to main content

anona-compute (Python)

Optional extras for Anona Compute on top of the stock E2B SDK. The stock SDK already works on its own:

export E2B_DOMAIN=compute.anonalabs.com
export E2B_API_KEY=ac_...          # an API key from https://compute.anonalabs.com

This package adds sandbox sizes, live view tokens and SSH certificates.

pip install anona-compute
import anona_compute

anona_compute.configure(api_key="ac_...")       # or set ANONA_API_KEY / E2B_API_KEY
sbx = anona_compute.Sandbox.create("python", size="large")  # a subclass of e2b.Sandbox

url = sbx.live.url(mode="dom")          # view-only embed URL, 600 s
tok = sbx.live.token(scope="control", channels=["pty"], ttl=120)
sbx.live.revoke_all()

cert = sbx.ssh.certificate("~/.ssh/anona_ed25519.pub")
cert.write("~/.ssh/anona_ed25519-cert.pub")
print(sbx.ssh.config(identity_file="~/.ssh/anona_ed25519"))

Environment mapping: ANONA_API_KEY → E2B_API_KEY, ANONA_DOMAIN → E2B_DOMAIN (default compute.anonalabs.com), ANONA_API_URL → E2B_API_URL (deprecated by E2B, fallback only). E2B_* values always win.

size is small (1 vCPU, 2 GiB, 10 GB disk), medium (2, 4 GiB, 20 GB), large (4, 8 GiB, 40 GB) or xl (8, 16 GiB, 80 GB). Without it a sandbox runs at its template's own size.

When every host is full the API answers 503 with Should-Retry: true while it starts another. Sandbox.create and Sandbox.connect then wait and retry after each Retry-After (held between 1 and 30 s) for up to 10 minutes: wait_for_capacity= (seconds) and on_capacity_wait= per call or in configure(), or ANONA_COMPUTE_CAPACITY_WAIT; 0 turns it off. Each wait is logged at INFO on the anona_compute logger. Other errors, plan limits included, are raised at once.

Install the desktop extra with pip install "anona-compute[desktop]".

This is the Python library only. The anona-compute command-line tool is a separate npm package: npm install -g @anona-labs/anona-compute.

Development

uv venv -p 3.12 .venv && uv pip install -p .venv/bin/python -e ".[test]"
.venv/bin/python -m pytest -q          # fake gateway, no network
GATEWAY_URL=... GATEWAY_API_KEY=... .venv/bin/python -m pytest -m gateway

The version comes from the git tag sdk-v<version> (hatch-vcs); untagged builds get a 0.0.1.devN+g<sha> development version.

Metadata

Release files for anona-compute 0.3.0

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

Source distribution (sdist)

Source distribution for anona-compute 0.3.0
File Size Uploaded Provenance Actions
anona_compute-0.3.0.tar.gz 21.1 kB With provenance Details for anona_compute-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anona-compute 0.3.0
File Interpreter ABI Platform Actions
anona_compute-0.3.0-py3-none-any.whl Python 3 none any Details for anona_compute-0.3.0-py3-none-any.whl

Total release size: 40.1 kB

Release files / anona_compute-0.3.0.tar.gz

Download URL anona_compute-0.3.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
432e60fdc9f4105c4795c757b3d277aaa11674dc316d11cbb1a39a251e2daf18
BLAKE2b-256 checksum
How to use checksums
10e806421a066fa357ed6d6c5a61cac622994e8aa5e58f7fd9197ccc019cfda2
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 Nov 14, 2026.

Transparency log

Release files / anona_compute-0.3.0-py3-none-any.whl

Download URL anona_compute-0.3.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec9869e9424282209962ab91b44f1476e9afe6a0b5bdecf923a30f817bf843cc
BLAKE2b-256 checksum
How to use checksums
adf749d548b8eeae5abd949918e71994c2213a6aa0fd6583527fe19ccb64b255
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 Nov 14, 2026.

Transparency log

Security for anona-compute 0.3.0

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 anona_compute-0.3.0.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 Nov 14, 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