Skip to main content

zygo — Python client

Warm, isolated sandboxes for function-shaped code. A warm function costs about a millisecond and gets a clean process per request.

pip install zygo-sdk      # then `import zygo_sdk`
import zygo_sdk as zygo

client = zygo.connect()                 # `zygo api`, on loopback or a unix socket
resize = client.fn("resize")            # a function declared in sandbox.toml

out = resize({"url": "https://example.com/a.png"})
print(out.result, out.metrics.wall_ms)

Asynchronous, which is what an agent framework needs — the same methods, every one a coroutine:

import asyncio
import zygo_sdk as zygo

async def main(events):
    async with zygo.aio.connect() as client:
        return await asyncio.gather(*(client.call("resize", e) for e in events))

asyncio.run(main([{"url": "https://example.com/a.png"}]))

A refused request can be retried for you. Busy (the pool was full) and Unavailable (the host is still building or warming something) both mean the request never ran, so sending it again is safe; nothing else is retried:

client = zygo.connect(retries=3)        # waits the server's Retry-After, then again

A one-shot sandbox, needing nothing declared in advance:

r = client.run("python:3.12-slim", ["python3", "-c", "print(6 * 7)"], mem="128M")
print(r.stdout)

No dependencies. The standard library has an HTTP client, and a unix socket is thirty lines on top of it.

Full documentation: docs/book/17-api-sdk-mcp.md. The project: zygo.

Tests

python -m unittest discover -s tests

They run against a stand-in API and need no Linux, no kernel and no sandbox: what is under test is the client. A test that needs a real sandbox belongs in the Rust suites, against a real kernel.

Release files for zygo-sdk 0.1.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 zygo-sdk 0.1.3
File Size Uploaded
zygo_sdk-0.1.3.tar.gz 50.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zygo-sdk 0.1.3
File Interpreter ABI Platform
zygo_sdk-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 89.2 kB

Release files / zygo_sdk-0.1.3.tar.gz

Download URL zygo_sdk-0.1.3.tar.gz
Size 50.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1387e8f84a8043f185fd6e46ed2236ff40e64bb306155bc1fd73585538c2f5a9
BLAKE2b-256 checksum
How to use checksums
0e2834fc85b781e2a60b739c0ca7463348fbe99e8022c3786e2e85b9ee9cfb4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Sep 26, 2026.

Transparency log

Release files / zygo_sdk-0.1.3-py3-none-any.whl

Download URL zygo_sdk-0.1.3-py3-none-any.whl
Size 38.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed17515cf4989e773d799a49928ab4cd8087c46402340aa1e5cd19d9f87ba6eb
BLAKE2b-256 checksum
How to use checksums
9e8a02edd84469abc639c9d857bce2d17c884752d699e07a87296129b5615e74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

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