Skip to main content

Autonomi FFI — Python bindings

Direct-network, daemon-less Autonomi client for Python, generated by UniFFI from the ant-ffi Rust crate — the same compiled library that backs the Swift and Kotlin mobile SDKs. Unlike antd (which talks to a running antd daemon over REST/gRPC), this embeds the network client in-process, exactly like the mobile bindings.

Async Client methods are real async def — they run on Rust's tokio runtime and bridge to asyncio, so await client.data_put_public(...) works from plain asyncio with no extra event-loop setup.

Package name. The distribution is ant-sdk (matches this repo) — a working title, distribution name only: the import name is ant_ffi, fixed by the UniFFI crate namespace (pip install ant-sdk, then import ant_ffi). If a product-level rename happens, the PyPI project will be deleted and recreated under the new name. Track: V2-880.

Layout

python/
├── ant_ffi/
│   ├── __init__.py         # re-exports the generated surface
│   ├── ant_ffi.py          # generated by uniffi-bindgen (do not edit)
│   └── libant_ffi.dylib    # bundled native lib (per-platform; not committed)
├── examples/
│   └── upload_download_demo.py
├── tests/
│   └── test_smoke.py       # offline: import + version + address derivation
├── pyproject.toml
└── README.md

The generated ant_ffi.py and the bundled native library are build outputs — regenerate them with ffi/scripts/build.sh (which now includes a Python step).

Build the bindings

cd ffi/rust && cargo build --release -p ant-ffi
./target/release/uniffi-bindgen generate \
    --library target/release/libant_ffi.dylib \
    --language python --out-dir ../python/ant_ffi/
cp target/release/libant_ffi.dylib ../python/ant_ffi/   # or .so / .dll

(ffi/scripts/build.sh does all of the above alongside the C#/Kotlin/Swift steps.)

Build & check a wheel

This is a wheel-only distribution. sdist is deliberately blocked — a source tarball would embed this host's native library under a platform-neutral name — and the wheel build refuses to run unless the generated module and native library are staged (otherwise the wheel would install cleanly and fail on first import). Build and verify with:

cd ffi/python && python3 -m build --wheel
../scripts/check-python-wheel.sh   # installs into a throwaway venv + imports

Smoke test (offline, no network)

cd ffi/python && python3 tests/test_smoke.py

Upload/download demo (needs a devnet)

Start a local devnet (writes ~/.ant-dev/devnet-manifest.json):

cd ant-node && cargo run --release --bin ant-devnet -- \
    --preset small --enable-evm --manifest ~/.ant-dev/devnet-manifest.json

Then run the round-trip demo — connect from the manifest, upload a file (the manifest wallet pays inside ant-core), download it back, verify byte-identical:

cd ffi/python && python3 examples/upload_download_demo.py

Progress callbacks & threading

_with_progress / download_*_to_file methods take a ProgressListener (subclass it, implement on_progress). Callbacks arrive on a Rust/tokio worker thread, not the asyncio event loop. asyncio is not thread-safe, so to touch event-loop state from a callback, hop back with loop.call_soon_threadsafe(...). Keep callbacks quick — events flow through a bounded channel and a slow callback backpressures the transfer.

Metadata

Release files for ant-sdk 0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for ant-sdk 0.1.0
File Actions
ant_sdk-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for ant_sdk-0.1.0-py3-none-win_amd64.whl
ant_sdk-0.1.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for ant_sdk-0.1.0-py3-none-manylinux_2_28_x86_64.whl
ant_sdk-0.1.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for ant_sdk-0.1.0-py3-none-manylinux_2_28_aarch64.whl
ant_sdk-0.1.0-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details for ant_sdk-0.1.0-py3-none-macosx_11_0_universal2.whl

Total release size: 66.6 MB

Release files / ant_sdk-0.1.0-py3-none-win_amd64.whl

Download URL ant_sdk-0.1.0-py3-none-win_amd64.whl
Size 11.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
38f44f45b03e8593971f024b71e0296f13bc49e2e630abf37a11f20f17f0c789
BLAKE2b-256 checksum
How to use checksums
231ce18ead65e2415d06f2032a64fa08fca3308fdb8d1a640fa2dd7b6a1c432a
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 10, 2026.

Transparency log

Release files / ant_sdk-0.1.0-py3-none-manylinux_2_28_x86_64.whl

Download URL ant_sdk-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Size 15.5 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
acef98b16b56fbd380dbde6abd342a927022074db9a02c07bdd498a704a64697
BLAKE2b-256 checksum
How to use checksums
3868e88c554a6da996b0821b41390147a7b49c171b3b1bb8ee404e3e7cc35990
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 10, 2026.

Transparency log

Release files / ant_sdk-0.1.0-py3-none-manylinux_2_28_aarch64.whl

Download URL ant_sdk-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Size 15.8 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ade088f9a8976c61aa34b67d666270ed682b432664caf3824b67f3ae81a0af54
BLAKE2b-256 checksum
How to use checksums
96af02aba9718c934fe0c8c74c1470a9df4d7db346a452fd45b955a65044496d
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 10, 2026.

Transparency log

Release files / ant_sdk-0.1.0-py3-none-macosx_11_0_universal2.whl

Download URL ant_sdk-0.1.0-py3-none-macosx_11_0_universal2.whl
Size 24.0 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
b0d1f7207e33e955cd36d775121d2c9a6be17762086ac4babdaeb4582b947ba3
BLAKE2b-256 checksum
How to use checksums
df04970a1e875fc637f46c74246883fcd119fd19aa207ec204d363a5804fc2fe
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 10, 2026.

Transparency log

Security for ant-sdk 0.1.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

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for ant_sdk-0.1.0-py3-none-win_amd64.whl

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 10, 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.1.0 This release

4 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