{"id":28235191,"url":"https://github.com/mdevolde/aztec_tool","last_synced_at":"2026-03-05T00:32:55.063Z","repository":{"id":290775349,"uuid":"975476230","full_name":"mdevolde/aztec_tool","owner":"mdevolde","description":"A fast, pure-Python Aztec Code reader with auto‑orientation and Reed-Solomon correction.","archived":false,"fork":false,"pushed_at":"2025-05-06T11:35:59.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T23:11:28.799Z","etag":null,"topics":["2d-barcode","aztec","aztec-code","barcode","decoder","image-recognition"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/aztec-tool/","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/mdevolde.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}},"created_at":"2025-04-30T11:27:57.000Z","updated_at":"2025-05-06T11:35:30.000Z","dependencies_parsed_at":"2025-05-03T01:03:16.017Z","dependency_job_id":null,"html_url":"https://github.com/mdevolde/aztec_tool","commit_stats":null,"previous_names":["mdevolde/aztec_decoder","mdevolde/aztec_tool"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mdevolde/aztec_tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdevolde%2Faztec_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdevolde%2Faztec_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdevolde%2Faztec_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdevolde%2Faztec_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdevolde","download_url":"https://codeload.github.com/mdevolde/aztec_tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdevolde%2Faztec_tool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259573863,"owners_count":22878587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["2d-barcode","aztec","aztec-code","barcode","decoder","image-recognition"],"created_at":"2025-05-18T23:11:08.458Z","updated_at":"2026-03-05T00:32:49.981Z","avatar_url":"https://github.com/mdevolde.png","language":"Python","readme":"# Aztec tool 🛸\n[![aztec tool on pypi](https://badge.fury.io/py/aztec-tool.svg)](https://pypi.org/project/aztec-tool/)\n[![Test with PyTest](https://github.com/mdevolde/aztec_tool/workflows/Test%20with%20PyTest/badge.svg)](https://github.com/mdevolde/aztec_tool/actions)\n[![codecov](https://codecov.io/gh/mdevolde/aztec_tool/branch/master/graph/badge.svg)](https://codecov.io/gh/mdevolde/aztec_tool)\n[![Python Versions](https://img.shields.io/pypi/pyversions/aztec-tool.svg)](https://devguide.python.org/versions/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mdevolde/aztec_tool/pulls)\n\n*A fast, pure‑Python Aztec Code reader with auto‑orientation and Reed-Solomon correction.*\n\n-------------\n\nPlease note that the library is still under development, and some features are unstable. Typically, some Aztec files can be read incorrectly because the image has been exported incorrectly in matrix.\n\nAll contributions are welcome!\n\n-------------\n## Table of content\n1. [Installation](#installation)\n2. [Usage](#usage)\n3. [Useful links](#useful-links)\n   - [Contributing](#contributing)\n   - [Security](#security)\n   - [Changelog](#changelog)\n   - [TODO](#todo)\n   - [License](#license)\n   - [Code of Conduct](#code-of-conduct)\n6. [Resources](#Resources)\n\n## Installation\n\nThis library is compatible with **Python 3.9** and above.\n\nTo install the latest version of Aztec tool, you can use pip. Open your terminal and run the following command (in a virtual environment if you want to keep your system clean):\n\n```bash\npip install --upgrade aztec_tool\n```\n\nIf you cloned the repository, you can install it using pip as well, in the root directory of the project:\n\n```bash\npip install --upgrade .\n```\n\nThis library installs the following dependencies:\n- [OpenCV](https://pypi.org/project/opencv-python/) for image processing\n- [NumPy](https://pypi.org/project/numpy/) for numerical operations\n- [Reed-Solomon](https://pypi.org/project/reedsolo/) for error correction\n- [toml](https://pypi.org/project/toml/) for version reading\n\n## Usage\nThe library allows you to decode Aztec barcodes from images.\n\nThe most common way to use the library is to use the `AztecDecoder` class. You can create an instance of the class and call the `decode` method with the path to the image file as an argument. With this class, you need to have your Aztec barcode perfectly cropped in an image.\n\n```python\n\u003e\u003e\u003e from aztec_tool import decode\n\u003e\u003e\u003e decode(\"welcome_lib.jpg\")\n'Welcome to Aztec tool lib !'\n\u003e\u003e\u003e\n```\n\nIf you need to access more specific data, you can use the `AztecDecoder` class directly:\n\n```python\n\u003e\u003e\u003e from aztec_tool import AztecDecoder\n\u003e\u003e\u003e decoder = AztecDecoder(\"welcome_lib.jpg\")\n\u003e\u003e\u003e decoder.aztec_type\n\u003cAztecType.COMPACT: 0\u003e\n\u003e\u003e\u003e decoder.mode_info\n{'layers': 3, 'data_words': 21, 'ecc_bits': [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0]}\n\u003e\u003e\u003e decoder.decode()\n'Welcome to Aztec tool lib !'\n```\n\nIf you don't have the Aztec barcode perfectly cropped in an image, you can use this class to cropper it automatically:\n```python\n\u003e\u003e\u003e from aztec_tool import MultiAztecDecoder\n\u003e\u003e\u003e multi_decoder = MultiAztecDecoder(\"welcome_lib_non_cropped.jpg\")\n\u003e\u003e\u003e decoder = multi_decoder.decoders[0]\n\u003e\u003e\u003e decoder.aztec_type\n\u003cAztecType.COMPACT: 0\u003e\n\u003e\u003e\u003e decoder.mode_info\n{'layers': 3, 'data_words': 21, 'ecc_bits': [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0]}\n\u003e\u003e\u003e decoder.decode()\n'Welcome to Aztec tool lib !'\n```\n\nWhen you're using the `decode` function or the `AztecDecoder` (or `MultiAztecDecoder`) class, you can also pass three optional parameters:\n- `auto_orient`: Default is `True`. If set to `True`, the image will be automatically rotated to the correct orientation before decoding. This is useful if the barcode is reversed or rotated.\n- `auto_correct`: Default is `True`. If set to `True`, the data in the Aztec barcode will be automatically corrected. This is useful if the barcode is damaged or has errors.\n- `auto_mode_correct`: Default is `True`. If set to `True`, the mode data in the Aztec barcode will be automatically corrected. This is useful if the barcode is damaged or has errors.\n\nIf you have some problems with the correction, it can be useful to set `auto_correct` and/or `auto_mode_correct` to `False`.\n\nIf you need very specific data, you can access the `AztecDecoder` class attributes, or directly the various classes used in the library.\n\nThis library has its own exceptions. You can find them in the `exceptions.py` file. The most common exception is `AztecDecoderError`, which is the parent class of all the exceptions in the library.\n\nThe tool is also available as a command line interface (CLI). You can use it by running the following command in your terminal:\n\n```bash\n$ aztec-tool welcome_lib.jpg\nWelcome to Aztec tool lib !\n```\n\nIf you want to print the metadata of the Aztec code, you can use the `--info` option:\n\n```bash\n$ aztec-tool welcome_lib.jpg --info\nType:         COMPACT\nLayers:       3\nData words:   21\nECC bits:     01010101010010101000\n```\n\nYou can view all available options by running `aztec-tool -h`.\n\n## Useful links\n### Contributing\nContributions are welcome! If you want to contribute to the project, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n### Security\nIf you discover any security vulnerabilities, please read the procedure in the [SECURITY.md](SECURITY.md) file.\n\n### Changelog\nThe full changelog is available in the [CHANGELOG.md](CHANGELOG.md) file.\n\n### TODO\nThe plan for the next releases is available in the [TODO.md](TODO.md) file.\n\n### License\nThe Aztec tool is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n### Code of Conduct\nThe Aztec tool is committed to providing a friendly, safe, and welcoming environment for all. Please read the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) file for more details.\n\n## Resources\nThese resources were very useful to understand the Aztec code and build this library:\n- [Wikipedia - Aztec code](https://en.wikipedia.org/wiki/Aztec_Code)\n- [Youtube - How to Decode the Aztec Code](https://www.youtube.com/watch?v=xtlqYx6e1TE)\n- ISO/IEC 24778:2024: Information technology - Automatic identification and data capture techniques - Aztec Code bar code symbology specification\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdevolde%2Faztec_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdevolde%2Faztec_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdevolde%2Faztec_tool/lists"}