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

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.3
File Size Uploaded Provenance Actions
anona_compute-0.3.3.tar.gz 23.7 kB With provenance Details for anona_compute-0.3.3.tar.gz

Built distribution (wheel)

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

Total release size: 44.5 kB

Release files / anona_compute-0.3.3.tar.gz

Download URL anona_compute-0.3.3.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
84072a977a63ca05ae331a00bcb1a0113a68933abf19dd4eb46f846750d6650e
BLAKE2b-256 checksum
How to use checksums
fe5c5877887af391625fa4d41784408e38ba4a409e1b4569398777bb757e5809
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 21, 2026.

Transparency log

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

Download URL anona_compute-0.3.3-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40d434c03fc7589ec170c439cfef16a3fe05840d94eb82f6b60a4fb2b496d64e
BLAKE2b-256 checksum
How to use checksums
86d646f173aa609fbbb436b0fdf6bc793c216754fa92913bf757ba982701c968
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 21, 2026.

Transparency log

Security for anona-compute 0.3.3

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