{"id":26951455,"url":"https://github.com/algorandfoundation/algorand-python-testing","last_synced_at":"2026-04-14T05:00:49.096Z","repository":{"id":247552615,"uuid":"824563484","full_name":"algorandfoundation/algorand-python-testing","owner":"algorandfoundation","description":"Unit test your 🐍 smart contracts ","archived":false,"fork":false,"pushed_at":"2026-04-07T13:51:12.000Z","size":2816,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-07T15:26:58.104Z","etag":null,"topics":["algokit","algorand","lib","puya","pytest","python"],"latest_commit_sha":null,"homepage":"https://algorandfoundation.github.io/algorand-python-testing/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algorandfoundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-05T11:58:38.000Z","updated_at":"2026-04-07T13:51:15.000Z","dependencies_parsed_at":"2024-10-26T18:29:51.307Z","dependency_job_id":"63bdf19d-41c9-44cc-92bd-23b3681fc1dd","html_url":"https://github.com/algorandfoundation/algorand-python-testing","commit_stats":null,"previous_names":["algorandfoundation/algorand-python-testing"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/algorandfoundation/algorand-python-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgorand-python-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgorand-python-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgorand-python-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgorand-python-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algorandfoundation","download_url":"https://codeload.github.com/algorandfoundation/algorand-python-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgorand-python-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algokit","algorand","lib","puya","pytest","python"],"created_at":"2025-04-03T00:01:28.507Z","updated_at":"2026-04-14T05:00:49.076Z","avatar_url":"https://github.com/algorandfoundation.png","language":"Python","funding_links":[],"categories":["Core Resources"],"sub_categories":["AlgoKit"],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/algorandfoundation/algorand-python-testing\"\u003e\u003cimg src=\"https://bafybeiaibjaf6zy6hvef2rrysaacsfsyb3hw4qqtgn657gw7k5tdzqdxzi.ipfs.nftstorage.link/\" width=60%\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca target=\"_blank\" href=\"https://algorandfoundation.github.io/algorand-python-testing/\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-repository-74dfdc?logo=github\u0026style=flat.svg\" /\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://developer.algorand.org/algokit/\"\u003e\u003cimg src=\"https://img.shields.io/badge/learn-AlgoKit-74dfdc?logo=algorand\u0026mac=flat.svg\" /\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://github.com/algorandfoundation/algorand-python-testing\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/algorandfoundation/algorand-python-testing?color=74dfdc\u0026logo=star\u0026style=flat\" /\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://developer.algorand.org/algokit/\"\u003e\u003cimg  src=\"https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Falgorandfoundation%2Falgorand-python-testing\u0026countColor=%2374dfdc\u0026style=flat\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nAlgorand Python Testing is a companion package to [Algorand Python](https://github.com/algorandfoundation/puya) that enables efficient unit testing of Algorand Python smart contracts in an offline environment. It emulates key AVM behaviors without requiring a network connection, offering fast and reliable testing capabilities with a familiar Pythonic interface.\n\n[Documentation](https://algorandfoundation.github.io/algorand-python-testing/) | [Algorand Python Documentation](https://algorandfoundation.github.io/puya/)\n\n## Quick start\n\nThe easiest way to use Algorand Python Testing is to instantiate a template with AlgoKit via `algokit init -t python`. This will give you a full development environment with testing capabilities built-in.\n\nAlternatively, if you want to start from scratch:\n\n1. Ensure you have Python 3.12+\n2. Install [AlgoKit CLI](https://github.com/algorandfoundation/algokit-cli?tab=readme-ov-file#install)\n3. Install Algorand Python Testing into your project:\n    ```bash\n    pip install algorand-python-testing\n    ```\n4. Create a test file (e.g., `test_contract.py`):\n\n    ```python\n    from algopy_testing import algopy_testing_context\n    from your_contract import YourContract\n    \n    def test_your_contract():\n        with algopy_testing_context() as context:\n            # Arrange\n            contract = YourContract()\n            expected_result = ... # Your expected result here\n    \n            # Act\n            result = contract.your_method(context.any.uint64())  # Your test code here\n    \n            # Assert\n            assert result == expected_result\n    ```\n\n5. Run your tests using your preferred Python testing framework (e.g., pytest, unittest)\n\nFor more detailed information, check out the [full documentation](https://algorandfoundation.github.io/algorand-python-testing/).\n\n## Features\n\n-   Offline testing environment simulating core AVM functionality\n-   Compatible with popular Python testing frameworks\n-   Supports testing of ARC4 contracts, smart signatures, and more\n-   Provides tools for mocking blockchain state and transactions\n\n## Examples\n\nFor detailed examples showcasing various testing scenarios, refer to the [examples section](https://algorandfoundation.github.io/algorand-python-testing/examples.html) in the documentation.\n\n## Contributing\n\nWe welcome contributions to this project! Please read our [contributing guide](CONTRIBUTING.md) to get started.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorandfoundation%2Falgorand-python-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgorandfoundation%2Falgorand-python-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorandfoundation%2Falgorand-python-testing/lists"}