larzbarcode
EAN-13 and Code 128 barcodes as SVG.
Encode retail EAN-13 product codes (with correct check digits) and general-purpose Code 128 into a crisp SVG or a raw module bitmap. The standard patterns, verified against known codes. The 1D companion to larzqr.
larzscript pkg install barcode
What you get
- EAN-13 with check digits
- Code 128 (set B)
- Crisp SVG output
- Standard, verified patterns
Try it
import "barcode" as barcode
print(barcode.ean13_check_digit("400638133393"))
print(barcode.ean13_validate("4006381333931"))
let svg = barcode.ean13_svg("4006381333931")
print(len(svg), "bytes of SVG")Output
1 true 2612 bytes of SVG
Why it's in the Larz Stack
larzbarcode is a real Larzscript package (larzscript pkg install barcode) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.