--- id: zxing-cpp version: "3.1.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # zxing-cpp — Python bindings for the zxing-cpp barcode library License: permissive · Maintenance: active · Downloads: 860.7K/mo ## What it is and what it does zxing-cpp is a Python wrapper around the zxing-cpp C++ barcode library, enabling detection and generation of barcodes and QR codes from images. It exposes two main operations: read_barcodes() to detect and decode barcodes in an image (returning text, format, content type, and position), and create_barcode() to generate barcode images in multiple output formats (PNG via array or SVG). The package has no runtime Python dependencies and ships prebuilt wheels for current Python versions on major platforms, making installation straightforward on supported systems. The bindings are built with nanobind and scikit-build-core, which handle C++20 compilation. Reading requires an image input; writing produces either an image array or SVG string. The library supports configurable parameters like error correction level for QR codes and quiet zone control for SVG output. Use it for: - Detect and decode barcodes from images in inventory or point-of-sale applications - Generate QR codes for URLs or product identifiers on demand or in batch - Automate barcode recognition in document processing or logistics workflows - Create printable barcode labels with configurable scale and format - Integrate barcode recognition into image analysis pipelines ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads and writes barcodes and QR codes in images using Python bindings to the zxing-cpp C++ library. Yes. The package is actively maintained, marked Production/Stable, has no known vulnerabilities, and offers broad platform coverage via prebuilt wheels. Medium install friction is typical for compiled bindings and not a blocker. Use it if you need barcode reading and writing in Python. ## Install pip install zxing-cpp uv add zxing-cpp poetry add zxing-cpp ## Installing zxing-cpp Before you install: Medium install friction due to compiled C++ bindings; prebuilt wheels available for Python 3.9+ on macOS (Intel and ARM), Linux (x86_64 and aarch64), and Windows (x86_64 and ARM64). Building from source requires a C++20 compiler. License in practice: Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; attribution required. Quickstart: pip install zxing-cpp import zxingcpp # Reading barcodes from an image barcodes = zxingcpp.read_barcodes(img) for barcode in barcodes: print(barcode.text, barcode.format) # Writing a QR code qr = zxingcpp.create_barcode('test', zxingcpp.BarcodeFormat.QRCode) img_array = qr.to_image(scale=5) Requires Python 3.9 or later; image input and output handling depend on external libraries like OpenCV or PIL, which are not runtime dependencies of zxing-cpp. Verify before relying: - Which barcode formats are supported by the read_barcodes and create_barcode functions - Performance characteristics (speed, memory usage) for large images or batch processing - Whether to_image() returns a numpy array or requires PIL/Pillow for conversion ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 860.7K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags barcode reading python, qr code generation, barcode detection image, barcode decode library, qr code writer, barcode scanner, image barcode recognition, barcode-qr, image-processing, c++-bindings [View on SkillFed](https://skillfed.io/packages/zxing-cpp) · [View on PyPI](https://pypi.org/project/zxing-cpp/)