Python

The Python SDK is the Python client for the antd daemon.

Install

pip install antd[rest]
pip install antd[grpc]
pip install antd[all]

Connect to the daemon

from antd import AntdClient, AsyncAntdClient, discover_daemon_url

# REST transport by default
client = AntdClient()

# Async REST client
async_client = AsyncAntdClient()

# Explicit gRPC transport
grpc_client = AntdClient(transport="grpc", target="localhost:50051")

# Use discovery helpers if antd chose a non-default port
base_url = discover_daemon_url() or "http://localhost:8082"
discovered_client = AntdClient(base_url=base_url)

Store and retrieve data

For upload examples in this section, start antd in a write-enabled mode first. On the default network, that means wallet plus EVM payment configuration. On a local devnet, ant dev start provisions that for you.

Type mappings

Autonomi type
Python type

HealthStatus

antd.HealthStatus

PutResult

antd.PutResult

WalletAddress

antd.WalletAddress

WalletBalance

antd.WalletBalance

PrepareUploadResult

antd.PrepareUploadResult

FinalizeUploadResult

antd.FinalizeUploadResult

Raw data

bytes

Error handling

REST and gRPC share the same high-level API, but wallet operations and payment_mode are REST-only.

Full API reference

For all available daemon endpoints, see the REST API.

Last updated