Skip to main content

Python SDK — zeq.py

One file, standard library only, Python 3.8+. Self-hosted like the CLI — no PyPI, no pip, no external registry. Every node serves it, with a published pin at /cli/zeq.py.sha256.

curl -fsSO https://zeq.dev/cli/zeq.py # or any Zeq origin

Every numeric fact returned comes from the live kernel — the client adds nothing and rounds nothing (the framework's ≤0.1% tolerance applies).

Library

from zeq import Zeq

z = Zeq("https://zeqstate.com", key="zeq_ak_...") # or no key, then z.demo_key()

print(z.pulse()) # current Zeqond, phase, system-clock status
print(z.operators()[:5]) # browse the catalogue

env = z.compute("NM19", mass=5, acceleration=2)
print(env["result"]["value"], env["result"].get("units", ""))

print(z.verify(env)) # Ed25519 + independent recompute (verifier mesh)

The Zeq class methods:

MethodWhat it does
pulse()The node's clock — Zeqond, phase.
operators()The operator catalogue from the live registry.
demo_key()Mint a demo key for keyless experimentation.
compute(op, **inputs)Run an operator, get the signed CKO envelope back. Operator prefix → kernel domain inference mirrors the CLI (QM, NM, GR, CS, TD, EM).
verify(env)Verify an envelope — signature + independent recompute via the node's verify surface.

Errors raise ZeqError with .status and .payload carrying the node's structured error body.

Command line

The same file doubles as a CLI:

python3 zeq.py pulse
python3 zeq.py demo-key
python3 zeq.py compute NM19 mass=5 acceleration=2
python3 zeq.py verify envelope.json

Honest limits

  • It's a thin HTTP client — offline verification (the full Ed25519 + recompute check with no node in the loop) is the job of the served verifier scripts; z.verify() calls the node's verify surface.
  • Don't paste the file's contents into a terminal — download it (the header says so for a reason).

Source: served per-node at /cli/zeq.py (canonical copy in apps/zeq-dev/public/cli/zeq.py).