PyStrich is a fast pure-Python module to generate 1D and 2D barcodes: Code 39, Code 128 (including GS1-128), EAN-13, ITF-14, Data Matrix (including GS1 Data Matrix), QR Code, PDF417 and Aztec Code.
Actively maintained. Last release 3 weeks ago, commits in 18 of the last 26 weeks. A safe choice.
pip install pystrich
pyStrich
pyStrich is a fast pure-Python module to generate 1D and 2D barcodes in PNG, SVG and other image formats. Currently it supports:
- Code 39 (
code39) - Code 128 and GS1-128 (
code128) - EAN-13 (
ean13) - Interleaved 2 of 5 and ITF-14 (
itf) - Data Matrix and GS1 Data Matrix (
datamatrix) - QR Code (
qrcode) - PDF417 (
pdf417) - Aztec Code (
aztec)
PNG output requires Pillow, installable via the pyStrich[png] extra; SVG, EPS, DXF and terminal output do not. pyStrich supports encoding only, not decoding.
Available from PyPI: https://pypi.org/project/pyStrich/
Documentation: https://www.method-b.uk/pyStrich/docs/
Background
pyStrich was originally a fork of huBarcode. huBarcode was developed by HuDoRa from at least 2007, and has not been active since late 2013. forked huBarcode as pyStrich in 2015 to provide Python 3 support and to continue development. pyStrich has been substantially enhanced over the years and has gone far beyond a simple port to Python 3. As of 2026, pyStrich is a modern Python package with full use of typing, linting and a comprehensive test suite.