Registry / devops / qreader

qreader

JSON →
library3.16pypypi✓ verified 34d ago

QReader is a robust and straight-forward QR code detection and decoding library for Python, powered by a YOLOv8-based QR segmentation model. It excels at reading difficult, blurry, or tricky QR codes. The current version is 3.16, with active development and frequent updates.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QReader is a class exported from the qreader package.

from qreader import QReader

Basic usage: load an image, detect and decode QR codes, and print the result.

from qreader import QReader import cv2 # Initialize QReader qreader = QReader() # Read image image = cv2.imread('path/to/qr_code.jpg') if image is None: print('Could not load image') import sys sys.exit(1) # Detect and decode decoded_text = qreader.detect_and_decode(image=image) if decoded_text: print('Decoded text:', decoded_text) else: print('No QR code found')
Debug
Known footguns
gotchaReturns empty list if no QR code is found, not None.
gotchaInput image must be a numpy array (OpenCV format). QReader does not accept file paths directly.
deprecatedThe 'detect_and_decode' method with argument 'img' (instead of 'image') is deprecated in version 3.0+.
gotchaQReader downloads the YOLOv8 model on first use, which requires internet and may take a few seconds.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
Resources