finds.dev← search

// the find

NaturalHistoryMuseum/pyzbar

★ 824 · Python · MIT · updated Oct 2023

Read one-dimensional barcodes and QR codes from Python 2 and 3.

Python ctypes wrapper around the zbar C library for decoding barcodes and QR codes. Works with PIL, numpy arrays, and raw bytes, so it fits into most image processing pipelines without glue code. Aimed at developers who need barcode scanning in a Python script or service and don't want to shell out to an external process.

Accepts PIL images, OpenCV ndarrays, and raw byte tuples out of the box — no conversion boilerplate required. Returns structured namedtuples with bounding rect, polygon, type, and quality, which is more useful than just the decoded string. Includes Windows DLLs in the wheel so Windows users don't need a separate install step. Test suite covers edge cases like null-character barcodes and rotated QR codes.

Last commit was October 2023 and the upstream zbar C library stopped active development in 2012 — you're betting on a effectively abandoned dependency. The Windows DLLs bundle the old zbar fork, so orientation detection returns None on Windows; this is a silent gotcha that will confuse people. Still advertises Python 2.7 support in the badge and README, which is noise at this point. No async support and no way to decode from a video stream without managing frame extraction yourself.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →