Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ pip install aztec-py
**With extras:**

```bash
pip install "aztec-py[image]" # PNG output via Pillow
pip install "aztec-py[svg]" # lxml-backed SVG (optional; built-in SVG works without it)
pip install "aztec-py[pdf]" # PDF output via fpdf2
pip install "aztec-py[decode]" # Round-trip decode via python-zxing (requires Java)
pip install "aztec-py[image]" # PNG output via Pillow
pip install "aztec-py[svg]" # lxml-backed SVG (optional; built-in SVG works without it)
pip install "aztec-py[pdf]" # PDF output via fpdf2
pip install "aztec-py[decode-fast]" # Round-trip decode via zxingcpp — no Java needed
pip install "aztec-py[decode]" # Round-trip decode via python-zxing (requires Java)
```

---
Expand Down Expand Up @@ -421,11 +422,42 @@ build_gs1_payload([GS1Element("01","03453120000011"), GS1Element("21","XYZ001",v
build_gs1_payload([GS1Element("01","03453120000011"), GS1Element("3103","001250")])
```

### IATA BCBP boarding pass builder

Build a standards-compliant 60-character IATA Resolution 792 Format Code F string and encode it directly into an Aztec symbol:

```python
import datetime
from aztec_py import BCBPSegment, build_bcbp_string, AztecCode

seg = BCBPSegment(
passenger_name="SMITH/JOHN",
pnr_code="ABC123",
from_airport="LHR",
to_airport="JFK",
carrier="BA",
flight_number="0172",
date_of_flight=datetime.date(2026, 6, 15), # auto-converts to Julian day
compartment_code="Y",
seat_number="023A",
sequence_number=42,
passenger_status="0",
electronic_ticket=True,
)

bcbp = build_bcbp_string(seg) # always exactly 60 characters
AztecCode.from_preset(bcbp, "boarding_pass").save("boarding.svg")
```

`BCBPSegment` validates all fields (IATA airport codes, sequence range, passenger status digit). A name longer than 20 characters is truncated with a `UserWarning`. Pass the result directly to `from_preset(..., "boarding_pass")` — no manual padding or field formatting required.

### Round-trip decode (testing / CI validation)

```python
from aztec_py import AztecCode, decode # requires [decode] extra + Java
from aztec_py import AztecCode, decode

# Java-free (recommended):
# pip install "aztec-py[decode-fast]"
code = AztecCode("test payload")
assert decode(code.image()) == "test payload"
```
Expand Down Expand Up @@ -474,7 +506,9 @@ The script is skip-safe when ZXing/Java are unavailable — safe for CI environm

See [CHANGELOG.md](CHANGELOG.md) for the full history.

**Latest: [1.1.0]** — Batch encoding API, preset profiles, CLI bulk/benchmark mode, GS1 helpers, AztecRune improvements.
**Latest: [1.2.0]** — GS1 2027 FLG(0) compliance, IATA BCBP boarding pass builder, Java-free decode via zxingcpp, ECI roundtrip tests.

**[1.1.0]** — Batch encoding API, preset profiles, CLI bulk/benchmark mode, GS1 helpers, AztecRune improvements.

**[1.0.0]** — Production-grade fork: CRLF fix, EC capacity fix, SVG output, PDF output, AztecRune, CLI, type hints, Hypothesis property tests.

Expand Down
19 changes: 15 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ authors = [
{ name = "greyllmmoder" },
]
keywords = [
"aztec", "aztec-code", "barcode", "2d-barcode", "qr-code",
"iso-24778", "barcode-generator", "aztec-rune", "svg-barcode",
"gs1", "gs1-2027", "gs1-compliant", "gs1-aztec",
"boarding-pass", "label-printing", "batch-barcode",
"aztec", "aztec-code", "aztec-barcode", "aztec-code-python",
"barcode", "barcode-generator", "barcode-api", "python-barcode",
"2d-barcode", "qr-code", "qr-code-alternative",
"iso-24778", "gs1", "gs1-2027", "gs1-compliant", "gs1-aztec", "gs1-barcode",
"iata-bcbp", "boarding-pass", "boarding-pass-barcode",
"drug-serialization", "healthcare-barcode", "supply-chain",
"label-printing", "batch-barcode", "svg-barcode", "aztec-rune",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Manufacturing",
"Environment :: Console",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
Expand All @@ -30,6 +36,9 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Graphics",
"Topic :: Office/Business",
"Topic :: Printing",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Typing :: Typed",
Expand Down Expand Up @@ -66,6 +75,8 @@ dev = [

[project.urls]
Homepage = "https://github.com/greyllmmoder/python-aztec"
Documentation = "https://github.com/greyllmmoder/python-aztec#readme"
Changelog = "https://github.com/greyllmmoder/python-aztec/blob/main/CHANGELOG.md"
"Bug Tracker" = "https://github.com/greyllmmoder/python-aztec/issues"
Source = "https://github.com/greyllmmoder/python-aztec"
Upstream = "https://github.com/dlenski/aztec_code_generator"
Expand Down
Loading