{"id":26951448,"url":"https://github.com/algorandfoundation/algokit-client-generator-py","last_synced_at":"2026-05-02T08:11:32.874Z","repository":{"id":166753277,"uuid":"641487198","full_name":"algorandfoundation/algokit-client-generator-py","owner":"algorandfoundation","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-08T21:46:57.000Z","size":3302,"stargazers_count":3,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-08T23:25:59.608Z","etag":null,"topics":["algokit","lib"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algorandfoundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"2023-05-16T15:11:08.000Z","updated_at":"2026-04-08T21:43:50.000Z","dependencies_parsed_at":"2023-10-10T20:35:07.589Z","dependency_job_id":"bfda9405-4c82-45cf-babc-fde9a47630eb","html_url":"https://github.com/algorandfoundation/algokit-client-generator-py","commit_stats":null,"previous_names":["algorandfoundation/algokit-client-generator-py"],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/algorandfoundation/algokit-client-generator-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-client-generator-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-client-generator-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-client-generator-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-client-generator-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algorandfoundation","download_url":"https://codeload.github.com/algorandfoundation/algokit-client-generator-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-client-generator-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32527187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","lib"],"created_at":"2025-04-03T00:01:28.037Z","updated_at":"2026-05-02T08:11:32.866Z","avatar_url":"https://github.com/algorandfoundation.png","language":"Python","funding_links":[],"categories":["Core Resources"],"sub_categories":["AlgoKit"],"readme":"# AlgoKit Python client generator (algokit-client-generator-py)\n\nThis project generates a type-safe smart contract client in Python for the Algorand Blockchain that wraps the [application client](https://algorandfoundation.github.io/algokit-utils-py/html/apidocs/algokit_utils/algokit_utils.html#algokit_utils.ApplicationClient) in [AlgoKit Utils](https://github.com/algorandfoundation/algokit-utils-py) and tailors it to a specific smart contract. It does this by reading an [ARC-56](https://github.com/algorandfoundation/ARCs/pull/258) or [ARC-32](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0032.md) application spec file and generating a client which exposes methods for each ABI method in the target smart contract, along with helpers to create, update, and delete the application.\n\n## Usage\n\n### Prerequisites\n\nTo be able to consume the generated file you need to include it in a Python project that has (at least) the following package installed:\n\n```bash\npoetry add algokit-utils@^3\n```\n\n\u003e Note: Requires at least version `3.x` of AlgoKit Utils to work with the latest version of the generator.\n\n### Use\n\nTo install the generator as a CLI tool:\n\n```\npipx install algokit-client-generator\n```\n\nThen to use it\n\n```\nalgokitgen-py path/to/application.json path/to/output/client_generated.py\n```\n\nOr if you have [AlgoKit](https://github.com/algorandfoundation/algokit-cli) 1.1+ installed\n\n```commandline\nalgokit generate client path/to/application.json --output path/to/output/client_generated.py\n```\n\n### Generation modes\n\nThe generator supports two modes:\n\n#### Full mode (default)\n\n```bash\nalgokitgen-py path/to/application.json path/to/output/client_generated.py\n```\n\n-   Includes factory class for creating and deploying smart contracts\n-   Includes deployment types and methods\n-   Includes all deployment-related metadata (source code, bytecode, template variables)\n-   Includes client class for interacting with already deployed contracts\n-   Best for development, deployment and interaction workflows or where output size is less important\n\n#### Minimal mode\n\n```bash\nalgokitgen-py path/to/application.json path/to/output/client_generated.py --mode minimal\n```\n\n-   Excludes factory class and deployment capabilities\n-   Excludes deployment-related metadata to reduce output size\n-   Only includes client class for interacting with already deployed contracts\n-   Best for scenarios that only need to interact with existing contracts\n\n## Examples\n\nThere are a range of [examples](./examples) that you can look at to see a source smart contract (e.g. `{app_name}/contract.py`), the generated client (`artifacts/{app_name}/{app_name}_client.py`) and some tests that demonstrate how you can use the client (`tests/{app_name}_test_client.py`).\n\n## Contributing\n\nIf you want to contribute to this project the following information will be helpful.\n\n### Initial setup\n\n1. Clone this repository locally\n2. Install pre-requisites:\n\n    - Install `AlgoKit` - [Link](https://github.com/algorandfoundation/algokit-cli#install): Ensure you can execute `algokit --version`.\n    - Bootstrap your local environment; run `algokit project bootstrap all` within this folder, which will:\n        - Install `Poetry` - [Link](https://python-poetry.org/docs/#installation): The minimum required version is `1.2`. Ensure you can execute `poetry -V` and get `1.2`+\n        - Run `poetry install` in the root directory, which will set up a `.venv` folder with a Python virtual environment and also install all Python dependencies\n\n3. Open the project and start debugging/developing via:\n    - VS Code\n        1. Open the repository root in VS Code\n        2. Install recommended extensions\n        3. Run tests via test explorer\n    - IDEA (e.g. PyCharm)\n        1. Open the repository root in the IDE\n        2. It should automatically detect it's a Poetry project and set up a Python interpreter and virtual environment.\n        3. Run tests\n    - Other\n        1. Open the repository root in your text editor of choice\n        2. Run `poetry run pytest`\n\n### Subsequently\n\n1. If you update to the latest source code and there are new dependencies you will need to run `algokit project bootstrap all` again\n2. Follow step 3 above\n\n### Building examples\n\nIn the `examples` folder there is a series of example contracts along with their generated client. These contracts are originally written in various languages including [Algorand Python](https://github.com/algorandfoundation/puya), [Algorand TypeScript](https://github.com/algorandfoundation/puya-ts), and [TealScript](https://github.com/algorandfoundation/TEALScript).\n\nSome contracts are directly imported through the ARC-32/56 app spec and not through contract source code.\n\nIf you want to make changes to any of the smart contract examples and re-generate the ARC-32/56 JSON specs files then change the corresponding `examples/smart_contracts/{app_name}/contract.py` file and then run:\n\n```bash\npoetry run python -m examples\n```\n\nOr in Visual Studio Code you can use the default build task (Ctrl+Shift+B).\n\nTo regenerate the generated clients run `poetry run poe update-approvals`.\n\nThis package currently depends on Python 3.10, however the development depends on Python 3.12. This is represented by the `pyproject.toml` file which requires 3.10 with additional requirements on dev dependencies.\n\n### Continuous Integration / Continuous Deployment (CI/CD)\n\nThis project uses [GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions) to define CI/CD workflows, which are located in the [`.github/workflows`](./.github/workflows) folder.\n\n### Approval tests\n\nMaking any changes to the generated code will result in the approval tests failing. The approval tests work by generating a version of client and outputting it to `./examples/APP_NAME/client_generated.py` then comparing to the approved version `./examples/APP_NAME/client.py`. If you make a change and break the approval tests, you will need to update the approved version by overwriting it with the generated version. You can run `poetry run poe update-approvals` to update all approved clients in one go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorandfoundation%2Falgokit-client-generator-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgorandfoundation%2Falgokit-client-generator-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorandfoundation%2Falgokit-client-generator-py/lists"}