Portfolio & Price Trackers

PuyaWrite Algorand Smart Contracts in Python

Write Algorand smart contracts in Python with Puya, a free open source compiler. See setup steps, requirements and safety tips.

Free Open source Windows: Likely v5.10.1 Updated 26 Oct 2026
7 min read Last update 26 Oct 2026 github.com/algorandfoundation/puya

Puya is an official Python-to-TEAL compiler from the Algorand ecosystem, made for developers who want to write Algorand smart contracts with Python syntax. Instead of writing TEAL assembly by hand, you write contract logic in a statically typed Python dialect and let the compiler turn it into code the Algorand Virtual Machine (AVM) can run. The project is open source, free, and has received a recent code update, so it is an active tool rather than an abandoned one.

If you are looking for portfolio tracking or price alerts, this is not that kind of program. Puya belongs to the developer toolchain and makes the most sense for people already comfortable with Python who are building on Algorand. This page explains what the compiler does, how to set it up, and how it compares with the portfolio and tax tools in our catalog.

02

What Is Algorand Python and Why It Exists

Algorand Python is a restricted version of the Python language built to run on the Algorand Virtual Machine. It is not every feature of Python, but a deliberately narrower subset that fits the rules of on-chain code. The framework supports the development of smart contracts and logic signatures, two different kinds of programs that decide whether transactions are allowed.

The main idea is familiar syntax with a strict type system. Developers declare the types of their variables, so many mistakes are caught before the code is compiled. Pythonic interfaces expose the AVM's underlying functions in a readable way, so you can call them without writing assembly-style instructions.

Because the framework works with standard Python tooling, editors, linters and test frameworks that already handle Python can be used alongside it. That keeps the learning curve smaller for people who already write Python scripts or backend code, even if blockchain logic is new to them.

03

Who Puya Is For

Puya is aimed at developers who want to build on Algorand and prefer to write in Python. A backend engineer who already maintains Python services may find it easier to pick up than a lower-level assembly language. A student learning smart contract design can also use it to see how high-level logic maps to program instructions.

It is less suited to people who only use blockchain networks. If you want to send tokens, check balances or follow prices, you need a wallet, an explorer or a tracker, not a compiler. Teams building a product should plan time for testing and review, because a compiled contract may control real assets.

Small experiments are a good starting point. Write a simple contract, compile it, read the TEAL output and compare it against what you expected. That exercise builds intuition quickly and shows whether the language fits your project before you commit to it.

04

How a Python Contract Becomes AVM Code

The compilation process takes Python source and produces TEAL, the assembly-like language the Algorand Virtual Machine executes. Each function, condition and state operation in your file is translated into a sequence of AVM instructions. The output is readable, so you can inspect what the compiler produced instead of trusting a black box.

Two concepts matter here. A smart contract is a program stored on the blockchain that runs when called by a transaction. A logic signature is a small program that decides whether a specific transaction may be authorized, often alongside other rules. Both are constrained by the AVM, which limits resource use and enforces deterministic behavior, so every node reaches the same result.

When you change your Python source, you compile again. Comparing old and new TEAL output is a practical way to review changes before deployment.

05

Key features

Python-based contract syntax

You write Algorand smart contracts and logic signatures in a statically typed subset of Python. The syntax stays close to standard Python, so developers can keep familiar habits, editors and testing workflows. Pythonic interfaces wrap the underlying AVM functions, which means everyday tasks do not require memorizing low-level instructions.

Compilation from Python to TEAL

The compiler converts Python source into TEAL, the assembly-like language the AVM executes. A quick command-line check confirms the installation works before you begin a real project. Because the output is readable TEAL, you can inspect exactly what the compiler produced before anything goes near a live network.

Simple project layout

A typical project starts with a single file such as contract.py, where you define your contract logic. You can grow from one file to a larger codebase while keeping the same compile step. This makes the tool approachable for quick experiments as well as for more structured applications.
06

Supported coins

The compiler targets the Algorand Virtual Machine, so Algorand is the network it is built for. Contracts written with Puya run on Algorand, and the project documentation focuses on that chain alone.

07

How to install Puya on Windows

  1. 1

    Check your Python version for Puya on Windows

    Puya expects Python 3.12 or newer. Open a Command Prompt or PowerShell window and run the version command for your interpreter. If the version is older, install a newer Python release first, then continue with the next step.

  2. 2

    Get the compiler from the official source

    Download only from the official website or the project's GitHub Releases page. Verify the SHA-256 checksum or signature if one is published, then install the package as described in the documentation. Check the releases page for the current build, which is v5.10.1 at the time of writing.

  3. Run a quick check

    Confirm that the compiler runs from your terminal. Then create a file named contract.py with a minimal contract and compile it as a test. If the command reports an error, recheck your Python version before reinstalling anything.

08

System requirements

  • Windows with Python 3.12 or newer installed, since the compiler runs on the Python interpreter
09

How to use Puya

Once the compiler is installed, the workflow is short and repeatable. Work in a clean folder so your contract files and compiled output stay easy to track.

  1. Create a file such as contract.py and write your contract logic using the Algorand Python classes and functions.
  2. Run the compiler from the terminal against that file.
  3. Review the generated TEAL output to confirm it matches what you intended.
  4. Test the contract in a local or test environment before deploying anything.
  5. Keep the Python source under version control so each compiled version can be traced back to its code.

A good habit is to change one rule at a time and compile after each change. If the TEAL output shifts in a way you did not expect, you can find the cause quickly.

10

Pros & cons

Pros
  • Official compiler from the Algorand ecosystem
  • Free and open source, with the code publicly available on GitHub
  • Python syntax lowers the learning curve for developers who already know Python
  • Recently updated codebase with published documentation
Cons
  • A developer tool only, with no interface for everyday users
  • Requires Python 3.12 or newer
  • Built for the Algorand network alone
  • Windows support is listed as likely, so you should check releases for a native build
11

Is Puya safe?

Puya is a development tool and does not hold keys or funds itself, but the code you compile can end up controlling real assets on Algorand, so treat it carefully. Get the program only from the official documentation site or the GitHub Releases page of the Algorand Foundation repository. Compare the SHA-256 checksum or signature with the value the project publishes before running any installer. Never enter a seed phrase on a third-party website, and avoid unofficial copies of the compiler. Recheck the latest version on the official website before starting a new project.

  • Official source only. Download from github.com/algorandfoundation/puya. Ignore ads and lookalike domains.
  • Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
  • Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
12

Alternatives

Most programs in this catalog help you track holdings, calculate taxes or follow prices, including Raccoin, Rotki, Hledger, Ticker and Cardano Monitor. Puya fills a different role: it turns Python code into smart contracts for Algorand, so it sits earlier in the workflow. Portfolio and accounting tools become relevant after your contract is live and producing transactions. If you need a plain-text ledger, Hledger is one option. If you need a privacy-focused portfolio view, Rotki is closer in scope. Choose based on whether you are building on a blockchain or tracking activity on one.

13

Specifications

Price
Free
Type
Open source
License
—
Latest version
v5.10.1
Last update
26 Oct 2026
Windows support
Likely (builds for Windows; check releases)
Source code
github.com/algorandfoundation/puya
14

Frequently asked questions

Yes. Puya is free and open source, and its source code is publicly available on GitHub. There are no listed prices or paid tiers for the compiler itself. Costs you may face come from your own development and testing work, not from the tool.

Puya is safe to install when you get it from the official documentation site or the GitHub Releases page. Verify the SHA-256 checksum or signature before running the installer. Avoid unofficial copies, since a modified compiler could produce code you did not intend to write.

The project appears to build for Windows, but its listing describes Windows support as likely rather than guaranteed. Check the releases page for a current Windows build that matches your system. Install Python 3.12 or newer first, then run a quick compile test to confirm everything works.

Puya requires Python 3.12 or newer. Older interpreters may fail to run the compiler or produce errors during setup. Check your installed version in a terminal before installing, and upgrade Python if needed so the compiler runs without problems.

No. Puya is a compiler for writing Algorand smart contracts in Python. It does not show balances, follow prices or generate tax reports. For portfolio tracking, use a dedicated tracker or accounting program from our catalog instead.

Puya is built for Algorand. It compiles code for the Algorand Virtual Machine, so contracts written with it are intended for the Algorand network. The project documentation focuses on Algorand alone, so it is not a tool for other chains.

15

Verdict

Puya is a solid choice for Python developers who want to build Algorand smart contracts without writing TEAL by hand. It is free, open source, and maintained within the Algorand ecosystem. It is not a good fit for investors, traders or accountants looking for portfolio tracking, price alerts or tax reports. Start with the documentation, test small contracts thoroughly, and recheck the latest version on the official website before building anything significant.

Download now