pyzbar
Read one-dimensional barcodes and QR codes from Python 2 and 3.
What it is and what it does
pyzbar is a Python wrapper around the zbar barcode-reading library that decodes one-dimensional barcodes and QR codes from images. It accepts image data in multiple formats and returns structured results including the decoded data, barcode type, bounding rectangle, polygon points, orientation, and quality score. The package is pure Python and works across Python 2.7 and Python 3.5 through 3.10.
The main use case is extracting barcode information from images in applications that need to read physical barcodes or QR codes. It provides both the decoded content and precise spatial information about where barcodes appear in an image, making it useful for inventory systems, document scanning, or any workflow that processes barcode-labeled items. The package has minimal runtime dependencies but requires the external zbar library to be installed on your system.
Use it for:
- Inventory or warehouse management systems that scan physical barcodes from photos or camera feeds
- Document processing pipelines that extract barcode data and location from scanned pages
- QR code extraction from images for ticketing, URL routing, or contact information
- Batch barcode reading from a directory of images with location-based filtering or validation
- Computer vision applications combining barcode detection with image processing workflows
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decodes one-dimensional barcodes and QR codes from images using the zbar library, returning decoded data and precise barcode locations.
Yes, if you need barcode or QR code reading and can install the zbar library. The package is stable and permissively licensed, but dormant since 2022 with no recent updates—acceptable for a mature wrapper around a stable external library, but verify zbar library support for your platform before committing. No known vulnerabilities.
Install
pyzbar on PyPI
pip
pip install pyzbaruv
uv add pyzbarpoetry
poetry add pyzbarInstalling pyzbar
Before you install
Low install friction with a pure-Python wheel. Dormant since March 2022; last commit October 2023. Requires the zbar shared library installed separately on non-Windows systems (brew or apt-get), but Windows wheels include zbar DLLs.
License in practice
MIT license (permissive) means you can use this freely in commercial and private projects with minimal restrictions, though you must include the license notice.
Quickstart
pip install pyzbar
from pyzbar.pyzbar import decode
results = decode(image_data)
for r in results:
print(r.data, r.type, r.rect)
The zbar shared library must be installed separately: brew install zbar (macOS) or sudo apt-get install libzbar0 (Linux). Windows wheels include it. On Windows, Visual C++ Redistributable Packages for Visual Studio 2013 may be required.
Verify before relying
- Whether the package is actively maintained or if dormancy signals abandonment risk for future Python versions
- Compatibility with Python versions beyond 3.10 (classifiers list only up to 3.10)
- Current zbar library version requirements and platform-specific installation complexity
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — enum34, pathlib |
| Maintenance | dormant — 1,613 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,804,189/month — #2,881 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyzbar-0.1.9-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pylibdmtxReads and writes Data Matrix barcodes,…
permissive · top 15,000 on PyPI
pyzxingDecode barcodes and QR codes from images or…
permissive · top 15,000 on PyPI
qreaderQReader detects and decodes QR codes from…
permissive · top 15,000 on PyPI
zxing-cppReads and writes barcodes and QR codes in…
permissive · top 5,000 on PyPI
treepoemGenerates barcodes and QR codes as image…
permissive · top 5,000 on PyPI
pyStrichpyStrich generates 1D and 2D barcodes (Code 39,…
permissive · top 15,000 on PyPI
biipBiip parses and interprets data encoded in…
permissive · top 15,000 on PyPI
texture2ddecoderDecodes compressed texture formats (BC, PVRTC,…
permissive · top 15,000 on PyPI
qrdetDetects and segments QR codes in images using a…
permissive · top 15,000 on PyPI
PyRectPyRect provides a Rect class for representing…
permissive · top 5,000 on PyPI