pyzxing
Reliable Python bindings for the ZXing barcode decoder.
What it is and what it does
pyzxing is a Python wrapper around the ZXing barcode decoder that delegates decoding to a versioned, checksum-verified Java Runner. It accepts file paths or NumPy arrays and returns a consistent list of dictionaries, each containing decoded text, format, raw bytes, byte segments, result points, orientation, and metadata. The library supports QR Code, Data Matrix, PDF417, Aztec, and common one-dimensional barcode formats, with control over decode hints like format constraints, character sets, and effort levels.
The package runs on Linux, macOS, and Windows with Python 3.8–3.14 and Java 17+. It automatically downloads and verifies the matching ZXing Runner on first use, or can receive it from conda-forge. Runtime dependencies are minimal—only joblib and numpy—making installation straightforward. The API is stable and designed for both single-image and batch (glob) decoding workflows.
Use it for:
- Decode QR codes from uploaded images in a web application or document processing pipeline.
- Batch scan a directory of product barcodes to extract SKUs or inventory data.
- Extract binary payloads from QR codes while preserving byte segments for lossless reconstruction.
- Integrate barcode reading into a desktop or server application with explicit format hints to improve accuracy.
- Process video frames or webcam input by converting them to NumPy arrays and decoding on demand.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decode barcodes and QR codes from images or NumPy arrays using ZXing, supporting QR Code, Data Matrix, PDF417, Aztec, and one-dimensional formats with format hints and binary payload preservation.
Yes. pyzxing is actively maintained, has low install friction, carries no known vulnerabilities, and offers a stable, well-documented API for barcode decoding. The MIT license is permissive. The only real constraint is the Java 17+ requirement, which is a runtime dependency, not a blocker for most environments. Install it if you need reliable barcode or QR code decoding with control over decode hints and access to raw metadata.
Install
pyzxing on PyPI
pip
pip install pyzxinguv
uv add pyzxingpoetry
poetry add pyzxingInstalling pyzxing
Before you install
Low friction: pure Python wheel with only joblib and numpy as runtime dependencies. Active maintenance with a release 28 days ago. Requires Java 17+ on PATH and downloads a pinned ZXing Runner on first use with SHA-256 verification.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install pyzxing
from pyzxing import BarCodeReader
reader = BarCodeReader()
results = reader.decode("/path/to/qrcode.png")
for result in results:
print(result["format"], result["text"])
Java 17 or newer must be available as `java` on PATH; optional OpenCV for NumPy array input.
Verify before relying
- Performance characteristics when decoding large image batches or high-resolution images.
- Memory overhead of the Java Runner process and whether it persists across multiple decode calls.
- Compatibility with containerized or restricted environments where Java PATH access may be limited.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — joblib, numpy |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 562,094/month — #5,989 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyzxing-1.2.2-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 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
pylibdmtxReads and writes Data Matrix barcodes,…
permissive · top 15,000 on PyPI
pyStrichpyStrich generates 1D and 2D barcodes (Code 39,…
permissive · top 15,000 on PyPI
treepoemGenerates barcodes and QR codes as image…
permissive · top 5,000 on PyPI
qreaderQReader detects and decodes QR codes from…
permissive · top 15,000 on PyPI
biipBiip parses and interprets data encoded in…
permissive · top 15,000 on PyPI
pdf417genEncodes text and binary data into PDF417 2D…
permissive · top 15,000 on PyPI
qrcodeGenerates QR codes as images (PNG, SVG) or…
permissive · top 1,000 on PyPI
pypylonpypylon is the official Python binding for…
unclear · top 15,000 on PyPI