pyStrich
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.
What it is and what it does
pyStrich is a pure-Python barcode encoder that generates 1D codes (Code 39, Code 128, EAN-13, ITF-14) and 2D codes (Data Matrix, QR Code, PDF417, Aztec) in multiple output formats. It outputs to PNG (with pillow), SVG, EPS, DXF, and terminal text without requiring external binaries or system libraries beyond pillow for raster formats.
The package is actively maintained, supports current Python versions (>=3.10), and includes comprehensive typing and test coverage. It depends on pillow and typing-extensions at runtime. Use it when you need to programmatically generate barcodes for inventory, shipping, point-of-sale, or document workflows without external encoding services.
Use it for:
- Generate shipping labels and tracking barcodes for e-commerce order fulfillment.
- Create QR codes for product packaging, marketing materials, or event tickets.
- Encode inventory item numbers as Code 128 or EAN-13 for retail or warehouse systems.
- Produce Data Matrix codes for GS1 compliance in supply chain applications.
- Generate barcodes in SVG format for web applications or PDF documents without raster dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyStrich generates 1D and 2D barcodes (Code 39, Code 128, EAN-13, ITF-14, Data Matrix, QR Code, PDF417, Aztec) in PNG, SVG, EPS, DXF, and terminal formats using pure Python.
Yes. pyStrich is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. Install it if you need to generate barcodes in Python without external services or system dependencies (beyond pillow for PNG output). The recent release cadence and modern codebase make it a reliable choice for production use.
Install
pystrich on PyPI
pip
pip install pystrichuv
uv add pystrichpoetry
poetry add pystrichInstalling pyStrich
Before you install
Low install friction with only two runtime dependencies (pillow and typing-extensions). Actively maintained with a release from 2026-07-23.
License in practice
Apache-2.0 is permissive; you may use, modify, and distribute pyStrich freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pyStrich
from pystrich.code128 import Code128
barcode = Code128('ABC')
barcode.save('barcode.png')
Python >=3.10 required; PNG output requires the pyStrich[png] extra (installs pillow).
Verify before relying
- Performance characteristics compared to other barcode libraries (described as 'fast' but no benchmarks provided).
- Decoding capability (fact sheet states encoding only, but real-world use cases may need clarification).
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pillow, typing-extensions |
| Maintenance | actively maintained — 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,298/month — #14,300 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pystrich-0.19-py3-none-any.whl
Keywords: aztec, barcode, code128, code39, datamatrix, ean13, gs1, interleaved-2-of-5, itf14, pdf417, qrcode
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
ppf-datamatrixGenerates datamatrix codes (2D barcodes) in SVG…
permissive · top 15,000 on PyPI
treepoemGenerates barcodes and QR codes as image…
permissive · top 5,000 on PyPI
segnoGenerates QR codes and Micro QR codes…
permissive · top 5,000 on PyPI
PyQRCodePyQRCode generates QR codes in pure Python and…
permissive · top 15,000 on PyPI
qrcodeGenerates QR codes as images (PNG, SVG) or…
permissive · top 1,000 on PyPI
pyzxingDecode barcodes and QR codes from images or…
permissive · top 15,000 on PyPI
pdf417genEncodes text and binary data into PDF417 2D…
permissive · top 15,000 on PyPI
django-qr-codeGenerates QR codes as embedded SVG or PNG…
permissive · top 15,000 on PyPI
pyzbarDecodes one-dimensional barcodes and QR codes…
permissive · top 5,000 on PyPI
zxing-cppReads and writes barcodes and QR codes in…
permissive · top 5,000 on PyPI