// the find
oostendo/python-zxing
python wrapper for the ZXing barcode library
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.