Skip to main content

Algorand Python framework - API for writing Algorand Python smart contracts

Installation

The minimum supported Python version for writing Algorand Python smart contracts is 3.12.

You can install the Algorand Python framework from PyPI into your project virtualenv:

pip install algorand-python

If you're using poetry for dependency and virutalenv management, you can add it that way with poetry add algorand-python.

Once you have installed the Algorand Python framework, you can access the type definitions from the algopy module, e.g.

from algopy import Contract

For more details on using this API and the puyapy compiler see https://algorandfoundation.github.io/puya/

Versioning

The Algorand Python API follows semver principles, however since the compiler is very closely coupled with the stubs definition, it's worth noting the interplay.

Major

An increase in the major version should only occur if existing contracts would fail to type-check after the update.

Some examples of situations that might cause this:

  • Breaking changes to the signature of an existing function, such as a new parameter being added to an existing method and no default value is provided.
  • Something has been renamed, or moved such that the import path has changed (excluding moving between private modules, indicated with a leading underscore).
  • Something has been removed.

The first two examples would necessitate changes in the compiler itself as well, which should also be considered breaking changes, thus there would be a coinciding new major version of the compiler.

The third example may not necessitate a change to the compiler, although it probably would be likely there is one to remove the supporting code, but either way, since it will also change the behaviour in terms of what version range of the stubs is supported, should also result in a new major version of the compiler.

However, vice versa is not necessarily true: a new major version of the compiler may not require a new major version of the stubs. For example:

  • Any breaking change to the compiler that has no changes in the stubs.
  • The default value of a parameter has changed. This changes the meaning of existing code that does not supply a default, thus requiring a major version bump of the compiler, but no existing contracts will fail to compile.

Minor

When new functionality is added, the minor version should be bumped.

Example situations:

  • A new high level API has been added.
  • A new parameter has been added to an existing method but a default value has been provided.
  • A new TEAL/AVM version has been released with new low-level op-codes that should be exposed.

In each of these cases, there should be zero impact on whether existing contracts will compile or not. They all would also require a new compiler version to be released. Although the existing compiler version could continue to work with new stubs version, provided none of the new functionality is used, for simplicity the compiler should be updated to require the new stubs version as a minimum.

Patch

When a bug in the stubs themselves is fixed, or a non-functional change is made (such as changes to docstrings / documentation), the patch version should be bumped.

Examples:

  • Docstrings added/removed/updated.
  • Type parameters that were incorrectly specified are fixed (concrete example).
  • Adding something that was unintentionally omitted from the stubs, but is otherwise supported by the current compiler. Generally in these cases, the code would compile if a # type: ignore[<error-code>] was added (concrete example).

In each of these cases, the new stubs should functional correctly when paired with the current release of the compiler.

The second example is a slight break from semver principles, since this is not backwards compatible, as existing contracts may fail to compile. However, those contracts should not have compiled in the first place. The minimum version of stubs supported by the compiler should be increased to this new patch release, however this will only take effect on the next release of the compiler itself. The current compiler release would detect the new stubs version as supported though, and so users can update to that new version of the stubs once it is released.

Metadata

Release files for algorand-python 4.0.0

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 algorand-python 4.0.0
File Interpreter ABI Platform Actions
algorand_python-4.0.0-py3-none-any.whl Python 3 none any Details for algorand_python-4.0.0-py3-none-any.whl

Release files / algorand_python-4.0.0-py3-none-any.whl

Download URL algorand_python-4.0.0-py3-none-any.whl
Size 65.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
295cdf25c4433ec69058bea7734df0db047e7614395848fb7ab7fff3fd6d1cb1
BLAKE2b-256 checksum
How to use checksums
86a255f12a60bdbe20f90b8a8af83577240ab23f90dca22f8b1920d25792b7a7
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 17, 2026.

Transparency log

Security for algorand-python 4.0.0

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.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for algorand_python-4.0.0-py3-none-any.whl

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 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.0.0 This release

1 release file Full provenance

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