Skip to main content

Python bindings for the zxing-cpp barcode library

Project description

Python bindings for zxing-cpp

Build + Deploy PyPI


pip install zxing-cpp


python install

[Note: To install via (or via pip install in case there is no pre-build wheel available for your platfor or python version), you need a suitable build environment including a c++ compiler.]


import cv2
import zxingcpp

img = cv2.imread('myimage.png')
results = zxingcpp.read_barcodes(img)
for result in results:
	print("Found barcode:\n Text:    '{}'\n Format:   {}\n Position: {}"
		.format(result.text, result.format, result.position))
if len(results) == 0:
	print("Could not find any barcode.")

To get a full list of available parameters for read_barcodes and write_barcode as well as the properties of the result objects, have a look at the PYBIND11_MODULE definition in this c++ source file.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zxing-cpp-2.1.0.tar.gz (646.0 kB view hashes)

Uploaded source

Built Distributions

zxing_cpp-2.1.0-cp311-cp311-win_amd64.whl (666.1 kB view hashes)

Uploaded cp311

zxing_cpp-2.1.0-cp311-cp311-win32.whl (607.7 kB view hashes)

Uploaded cp311

zxing_cpp-2.1.0-cp310-cp310-win_amd64.whl (666.1 kB view hashes)

Uploaded cp310

zxing_cpp-2.1.0-cp310-cp310-win32.whl (607.7 kB view hashes)

Uploaded cp310

zxing_cpp-2.1.0-cp39-cp39-win_amd64.whl (663.3 kB view hashes)

Uploaded cp39

zxing_cpp-2.1.0-cp39-cp39-win32.whl (607.7 kB view hashes)

Uploaded cp39

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page