Skip to main content

agni (Python client)

A typed Python client for agni. It calls the agni CLI or a running agni serve and returns the wire contract's own message classes, generated from protos/agni/v1.

pip install 'agni-eda[xlsx]'           # a release, from PyPI
pip install -e 'clients/python[xlsx]'  # a checkout

The distribution is agni-eda because PyPI's agni is an unrelated project, and the import is agni. Match its version to the agni binary or server it talks to.

from agni import Client, CliTransport, ConnectTransport

c = Client(CliTransport("agni", mounts={"tut": "examples/tutorial-project"}))
# or: c = Client(ConnectTransport("http://127.0.0.1:8080"))
snap = c.ingest("mount://tut/designs/gateway")
resp = c.run_query(snapshot=snap, query='component.class(?c, "resistor") => ?c')
c.delete_snapshot(snap)

Every question names a snapshot, a design loaded once under one config (agni issue 1061). ingest returns its name. It takes board_uri, as_named and overlay, which a request used to carry, and flatten_hierarchy, which reads a hierarchical EDIF netlist whole as --flatten-hierarchy does. A server holds a snapshot until it is deleted or evicted, and refuses one whose files changed. The client keeps the definition of each snapshot it ingested. If the server lost a snapshot, the client ingests it again under the same name and asks the question again. If the snapshot's files changed, the client updates it and asks again. The viewer does the same (agni issue 1067). If this client did not ingest a snapshot, or deleted it, a question naming it still raises AgniError with code not_found, and AgniError.snapshot_unavailable says which snapshot. The CLI transport has no server, so it keeps each definition itself under a name it mints (snapshots/cli-1) and turns it back into flags for every command it runs.

The guide, docsite/content/build/other-languages.md, covers choosing a transport, which rpcs the CLI covers, where the two differ today, and writing tables to xlsx.

  • examples/audit_workbook.py writes a five-sheet audit workbook of the tutorial board, asking its four tables as one query set (run_queries) so the design is read once.
  • examples/revision_audit.py compares two revisions of the gateway and audits the newer one, writing a workbook and a markdown summary that lists each tab still to be built. make exercise-revision-audit runs it with the checkout's binary (agni issue 843).
  • make proto-py regenerates src/agni/v1. Never edit it by hand; make proto-check fails on drift.
  • make python-test runs the suite against a built binary and a real server.
  • make python-dist V=vX.Y.Z builds the sdist and wheel that a release publishes. It writes them into dist/python and installs the wheel into a fresh venv to check it. The release workflow runs it, and the gate runs python-dist-check.

Metadata

Release files for agni-eda 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agni-eda 0.10.0
File Size Uploaded Provenance Actions
agni_eda-0.10.0.tar.gz 133.0 kB With provenance Details for agni_eda-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agni-eda 0.10.0
File Interpreter ABI Platform Actions
agni_eda-0.10.0-py3-none-any.whl Python 3 none any Details for agni_eda-0.10.0-py3-none-any.whl

Total release size: 290.2 kB

Release files / agni_eda-0.10.0.tar.gz

Download URL agni_eda-0.10.0.tar.gz
Size 133.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d6c668f7ee24c91aa98716028884d1f9447e163551d2acbf117b79790f5beeb9
BLAKE2b-256 checksum
How to use checksums
5c0e452f2911d200823542cfb4cb16ddb8b6fb3ea879486f30fc49fb8e6fe2a5
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 / agni_eda-0.10.0-py3-none-any.whl

Download URL agni_eda-0.10.0-py3-none-any.whl
Size 157.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48d55194b89cb7f605b7d7b70c5c13932d9c6effc971be904fd088ba96dc1957
BLAKE2b-256 checksum
How to use checksums
a1f3b628789bffd6af6c012e1a7b1129a5efc686e830ab089e1d29f61b0cb77f
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 agni-eda 0.10.0

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 agni_eda-0.10.0.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.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files Full provenance

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