Skip to content

stampix/auspostgen

 
 

Repository files navigation

AusPostGen

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.

Features

  • Generate Australia Post barcodes in various formats
  • Support for versions 37, 52, and 67
  • High-performance C extension for barcode generation
  • Simple Python API

Installation

# Using Poetry
poetry add stampix-auspostgen

# Using pip
pip install stampix-auspostgen

Usage

from stampix.auspostgen.generator import write_image

# Generate a barcode image
write_image("output.png", "12345678901234567890", version=37)

Development

  1. Clone the repository
  2. Install dependencies:
    poetry install
  3. Run tests:
    poetry run pytest

Notes

  • 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.

Project Structure

auspostgen/
├── stampix/
│   ├── __init__.py
│   └── auspostgen/
│       └── _c/
│           ├── __init__.py
│           ├── auspost.c
│           └── Makefile
├── tests/
│   └── __init__.py
├── docs/
├── pyproject.toml
└── README.md

License

MIT License - see LICENSE.txt for details

About

Australia Post Barcode Generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 70.7%
  • Python 25.5%
  • Makefile 2.1%
  • CMake 1.7%