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 GiB disk), medium (2, 4 GiB, 20 GiB), large (4, 8 GiB, 40 GiB) or xl (8, 16 GiB, 80 GiB). 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.4

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.4
File Size Uploaded Provenance Actions
anona_compute-0.3.4.tar.gz 24.8 kB With provenance Details for anona_compute-0.3.4.tar.gz

Built distribution (wheel)

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

Total release size: 46.7 kB

Release files / anona_compute-0.3.4.tar.gz

Download URL anona_compute-0.3.4.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cdf33abb7cb099f806a00e144e63d21e7a4e931fdb597dcb001a496622e1caf2
BLAKE2b-256 checksum
How to use checksums
aa0a123e8dd28a13d7d911285726e8ac73c12d19857c2a3ddb1fc3dbfb479819
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 24, 2026.

Transparency log

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

Download URL anona_compute-0.3.4-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
766c433914cf5ac98a04aecd06484fc604200621ea4dc852144e855418ef1270
BLAKE2b-256 checksum
How to use checksums
872724168ec71a0c30aa85d38d6da4933c32e7430fc35e372a24bf974e6e329e
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 24, 2026.

Transparency log

Security for anona-compute 0.3.4

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