Skip to main content

Algorand Python

Algorand Python is a partial implementation of the Python programming language that runs on the AVM. It includes a statically typed framework for development of Algorand smart contracts and logic signatures, with Pythonic interfaces to underlying AVM functionality that works with standard Python tooling.

Algorand Python is compiled for execution on the AVM by PuyaPy, an optimising compiler that ensures the resulting AVM bytecode execution semantics that match the given Python code. PuyaPy produces output that is directly compatible with AlgoKit typed clients to make deployment and calling easy.

Documentation | Language guide

Installation

The easiest way to use Algorand Python is to instantiate a template with AlgoKit via:

algokit init -t python

This will give you a full development environment with intellisense, linting, automatic formatting, breakpoint debugging, deployment and CI/CD.

A sample smart contract will be placed under PROJECT_NAME/projects/PROJECT_NAME/smart_contracts/SMART_CONTRACT_NAME/contract.py (replacing PROJECT_NAME and SMART_CONTRACT_NAME with the values you chose during the template wizard.)

Manual Alternative

Alternatively, if you want to start from scratch you can do the following:

  1. Ensure you have Python 3.12+
  2. Install AlgoKit CLI
  3. Check you can run the compiler:
    algokit compile py -h
    
  4. Install Algorand Python into your project poetry add algorand-python
  5. Create a contract in a (e.g.) contract.py file:
    from algopy import ARC4Contract, arc4
    class HelloWorldContract(ARC4Contract):
        @arc4.abimethod
        def hello(self, name: arc4.String) -> arc4.String:
            return "Hello, " + name
    

Usage

  1. Navigate to your contract and compile it:
    algokit compile py contract.py
    
  2. You should now have HelloWorldContract.approval.teal and HelloWorldContract.clear.teal on the file system!
  3. We generally recommend using ARC-56 and generated typed clients to have the most optimal deployment and consumption experience; PuyaPy produces an ARC-56 compatible app spec file by default:
    algokit compile py contract.py --no-output-teal
    
  4. You should now have HelloWorldContract.arc56.json, which can be generated into a client e.g. using AlgoKit CLI:
    algokit generate client HelloWorldContract.arc56.json --output client.py
    
  5. From here you can dive into the examples or look at the documentation.

Examples

There are many examples in this repo, here are some of the more useful ones that showcase what is possible.

The compiled output is available under the out/ directory alongside these, e.g. the approval TEAL for voting is available at examples/voting/out/VotingRoundApp.approval.teal.

Release files for puyapy 5.10.1

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

Built distribution (wheel)

Table of built distributions (wheels) for puyapy 5.10.1
File Interpreter ABI Platform
puyapy-5.10.1-py3-none-any.whl Python 3 none any Details

Release files / puyapy-5.10.1-py3-none-any.whl

Download URL puyapy-5.10.1-py3-none-any.whl
Size 772.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
317aa257c4ba9f2dec8c9dc7af68a3fed1020a4bcf986c004c0ed5c9ca76ced0
BLAKE2b-256 checksum
How to use checksums
f52d554b748c443d7ed87216c93e75fab6790a5b7663153fe79f3aa23a175647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

5.10.1 This release

1 release file

5.10.0

1 release file

5.9.0

1 release file

5.8.1

1 release file

5.8.0

1 release file

5.7.1

1 release file

5.7.0

1 release file

5.6.0

1 release file

5.5.0

1 release file

5.4.0

1 release file

5.3.2

1 release file

5.3.1

1 release file

5.3.0

1 release file

5.2.0

1 release file

5.1.0

1 release file

4.11.0

1 release file

4.10.0

1 release file

4.9.0

1 release file

4.8.1

1 release file

4.8.0

1 release file

4.7.0

1 release file

4.6.1

1 release file

4.6.0

1 release file

4.5.3

1 release file

4.5.2

1 release file

4.5.1

1 release file

4.5.0

1 release file

4.4.4

1 release file

4.4.3

1 release file

4.4.2

1 release file

4.4.1

1 release file

4.4.0

1 release file

4.3.3

1 release file

4.3.2

1 release file

4.3.1

1 release file

4.3.0

1 release file

4.2.1

1 release file

4.2.0

1 release file

4.1.1

1 release file

4.1.0

1 release file

4.0.0

1 release file

3.6.0

1 release file

3.5.0

1 release file

3.4.1

1 release file

3.4.0

1 release file

3.3.0

1 release file

3.2.3

1 release file

3.2.2

1 release file

3.2.1

1 release file

3.2.0

1 release file

3.1.0

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.3.0

1 release file

2.2.0

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

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