Quick start
Create a reader and decode one image:
from pyzxing import BarCodeReader
reader = BarCodeReader()
results = reader.decode("/path/to/qrcode.png")
for result in results:
print(result["format"], result["text"])
decode() always returns a flat list. For backward compatibility, a file
containing no barcode contributes a dictionary containing only filename;
a glob combines the per-file results from every matching file:
results = reader.decode("/path/to/images/*.png")
Limit decoding to selected formats when the input domain is known:
results = reader.decode(
"/path/to/image.png",
possible_formats=["QR_CODE", "DATA_MATRIX"],
)
See Usage for all hints and Result schema for the returned fields.