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

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.2
File Size Uploaded Provenance Actions
anona_compute-0.3.2.tar.gz 23.2 kB With provenance Details for anona_compute-0.3.2.tar.gz

Built distribution (wheel)

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

Total release size: 43.8 kB

Release files / anona_compute-0.3.2.tar.gz

Download URL anona_compute-0.3.2.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2442ff055c36defb93aedd3f85248a9fe48db314d48e415439c2c166886a38a4
BLAKE2b-256 checksum
How to use checksums
d14a751a77518cb1ecb2588cdb02af2e2482863f7721003eb9e56b56553fd4e1
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.2-py3-none-any.whl

Download URL anona_compute-0.3.2-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bb974b32b1571d3c4ef37665371fdff1e058ab019464eb1fd41e7a78434ed7c
BLAKE2b-256 checksum
How to use checksums
091d064243582592a471cbbcb0f9b797276554d06fddfc70af637a0fbc8b29c6
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.2

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