Offline AVM Simulation
Emulate AVM behaviour in pure Python — no sandbox, no network, no waiting.
algorand-python-testing is a companion to Algorand Python and requires Python 3.12+.
pip install algorand-python-testingpoetry add algorand-python-testinguv add algorand-python-testingimport algopyfrom algopy_testing import algopy_testing_context
class Counter(algopy.ARC4Contract): def __init__(self) -> None: self.count = algopy.GlobalState(algopy.UInt64(0))
@algopy.arc4.abimethod def increment(self) -> algopy.arc4.UInt64: self.count.value += algopy.UInt64(1) return algopy.arc4.UInt64(self.count.value)
with algopy_testing_context() as ctx: contract = Counter() result = contract.increment() assert result.as_uint64() == 1 assert contract.count.value == 1See the Quick Start tutorial for a richer walkthrough.
Offline AVM Simulation
Emulate AVM behaviour in pure Python — no sandbox, no network, no waiting.
ARC4 Support
First-class testing for ARC4Contract classes, ABI methods, and ARC4 types.
Transaction & State Helpers
Build transaction groups, manage global/local/box state, and inspect inner txns.
pytest-native
Plain Python tests — works with pytest, unittest, and hypothesis out of the box.