Skip to content

AlgoKit Utils Python

Build on Algorand with confidence using a comprehensive Python SDK
Terminal window
pip install algokit-utils
from algokit_utils import AlgoAmount, AlgorandClient, PaymentParams
# Connect to the network configured through environment variables,
# or default LocalNet configuration if no environment variables are set
algorand = AlgorandClient.from_environment()
# Create and fund a test account
account = algorand.account.random()
algorand.account.ensure_funded(
account_to_fund=account,
dispenser_account=algorand.account.localnet_dispenser(),
min_spending_balance=AlgoAmount.from_algo(10),
)
# Send a payment
result = algorand.send.payment(
PaymentParams(
sender=account.address,
receiver="RECEIVERADDRESS",
amount=AlgoAmount.from_algo(1),
)
)
print("Transaction ID:", result.tx_id)

This library follows the Guiding Principles of AlgoKit and is designed with the following principles:

  • Modularity - This library is a thin wrapper of modular building blocks over the Algorand SDK; the primitives from the underlying Algorand SDK are exposed and used wherever possible so you can opt-in to which parts of this library you want to use without having to use an all or nothing approach.
  • Type-safety - This library provides strong type hints with effort put into creating types that provide good type safety and intellisense when used with tools like MyPy.
  • Productivity - This library is built to make solution developers highly productive; it has a number of mechanisms to make common code easier and terser to write.

AlgorandClient

The main entry point for interacting with Algorand networks.

Transaction Composer

Build and send atomic transaction groups with ease.

App Client

Deploy and interact with smart contracts.

Testing Utilities

Comprehensive testing support for LocalNet.