A Python library for generating Australia Post Barcode versions 37, 52, and 67.
This is a fork off the auspostgen project by damiandennis maintained by Stampix. The goal of this fork was to make the package more modern and be usable in newer projects.
- Generate Australia Post barcodes in various formats
- Support for versions 37, 52, and 67
- High-performance C extension for barcode generation
- Simple Python API
# Using Poetry
poetry add stampix-auspostgen
# Using pip
pip install stampix-auspostgen
from stampix.auspostgen.generator import write_image
# Generate a barcode image
write_image("output.png", "12345678901234567890", version=37)
- Clone the repository
- Install dependencies:
poetry install
- Run tests:
poetry run pytest
-
There are some file comparison tests in the repo, but they don't give exactly the same results cross-platform so leaving this as is for now.
-
python-semantic-release doesn't update the version number inside the toml file &
__init__.py
for some reason. We will take a look later.
auspostgen/
├── stampix/
│ ├── __init__.py
│ └── auspostgen/
│ └── _c/
│ ├── __init__.py
│ ├── auspost.c
│ └── Makefile
├── tests/
│ └── __init__.py
├── docs/
├── pyproject.toml
└── README.md
MIT License - see LICENSE.txt for details