finds.dev

oostendo/python-zxing

python wrapper for the ZXing barcode library

View on GitHubHomepage ↗

★ 280Pythonupdated Oct 2021

// the take

A thin Python wrapper that shells out to the ZXing Java command-line tool and parses its text output into a BarCode object with format, raw value, decoded data and result points. It is for people who need to read 1D and 2D barcodes from image files in Python and don't mind running a JVM underneath.

- The parser turns ZXing's CommandLineRunner output into fields (format, raw, data, points), so callers don't have to scrape the Java tool's text themselves.

- decode() accepts a single path, a list of paths, or a directory, with a try_harder flag, so batch reads need no extra code.

- The surface is two classes, so it's easy to read and patch if you need another output field.

- Every decode spawns the Java CLI, so each image pays JVM startup. For more than a handful of images that will dominate runtime.

- Installation is manual: clone ZXing, run Maven, and wget a ZXing 2.2 jar pair over http. That is several major versions behind current, and it's the first thing that will break for anyone following the README.

- The parser depends on the exact line layout of ZXing's CLI output. Any change in a newer ZXing release breaks it, and the last push was October 2021, so nothing has been updated to match.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
280
Forks
103
Language
Python
Last commit
2 Oct 2021

// nearby

If python-zxing isn't quite it.

All repos →