skillfed

pyzxing

Reliable Python bindings for the ZXing barcode decoder.

pyzxing v1.2.2 562.1K downloads/30d#5,989 on PyPI184
Permissive license MIT Active released

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 pyzxing

uv

uv add pyzxing

poetry

poetry add pyzxing

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

barcode decoding pythonqr code readerzxing python bindingsdecode barcodes imagesbarcode scanner libraryqr code detectiondata matrix decoder
barcode-scanningqr-codesimage-processing

More Libraries packages