Skip to main content

QR Code & Barcode Scanner for Python

Decode QR codes, linear barcodes and other 2D formats, including Data Matrix, with a local Rust engine. Read decoded content and measured symbol geometry from Python, with QR scannability diagnostics for artistic or photo-captured codes.

The distribution is qrcode-barcode-scanner; the import is qrcode_barcode_scanner. Python 3.8 or later is required. The PyO3 extension returns the same versioned ScanReport as the Rust, Node.js and browser bindings.

Python API · Report contract · Scoring

Scan an image

import qrcode_barcode_scanner as qr

with open("label.png", "rb") as image:
    report = qr.scan(image.read(), profile="full")

for detection in report["detections"]:
    print(detection["symbology"], detection["content"]["text"])
    print("Physical occurrences:", len(detection["occurrences"]))

score = report["score"]
if score is not None:
    print(score["value"], score["grade"])
elif report["trace"]["budget_exhausted"]:
    print("Quality assessment did not finish within the scan budget.")

Repeated physical copies of the same content share one detection with several occurrences. Different contents stay separate. Use the geometry that was measured: a linear barcode can have endpoints instead of four corners. QR metadata and correction-margin diagnostics belong to the QR family only.

A missing score is not zero. QR quality diagnostics are software measurements, not hardware-verifier certification. The extension runs locally; decoding a URL does not visit its destination.

Choose the input

Function Input and result
scan(image, profile="full", ...) Encoded PNG, JPEG, WebP or GIF bytes; returns a report dict.
scan_frame(rgba, width, height, profile="frame", ...) Raw RGBA bytes and dimensions; returns the same report shape without an image-format roundtrip.
capabilities() Compiled reader versions, engines and symbologies; not proof that a particular image decodes.

scan_frame() processes a frame supplied by the caller. It does not acquire a camera or render an overlay.

Resource limits, budgets and exact payloads

Both scan functions accept max_dimension, max_pixels and budget_ms. The default caps are 10000 px per side and 64 million pixels; lower them when processing untrusted uploads. Caps are checked before pixel work.

An unset budget uses the profile default: full 4000 ms, fast 800 ms, frame 80 ms. budget_ms=0 removes the scan budget for reproducible scans. The clock starts after image decoding; the input caps bound the decoding step. A budget that prevents planned work sets report["trace"]["budget_exhausted"] to True. A None score then means “not judged”, and an empty detections list does not establish a completed search.

When no code is detected, the report contains an empty detections list. Invalid input or invalid scan options can raise ValueError; engine faults carry their QRS-xxx code.

content["raw"] is base64: original payload bytes for the QR family, the reader's reading for other symbologies. content["charset"] describes how content["text"] reads them. unknown is the only lossy charset; use raw in that case. Optional eci and fnc1 fields preserve ECI declarations and FNC1 position. Compare content identity using symbology, raw bytes, FNC1 and compatible ECI declarations, never display text alone.

Migration and documentation

Releases up to 0.9.0 were published as qrcode-ai-scanner.

To migrate, uninstall the previous distribution, install this one and import qrcode_barcode_scanner. The rename itself changes no function name or report field. The migration guide covers the runtime-specific steps.

Error codes · Security · Source · Report a bug

Part of QR Code AI. QR code scanner · Barcode scanner

License: AGPL-3.0-or-later. Commercial licensing is described in the licensing guide. © SuperNovae Studio.

Metadata

Release files for qrcode-barcode-scanner 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qrcode-barcode-scanner 0.11.0
File Size Uploaded Provenance Actions
qrcode_barcode_scanner-0.11.0.tar.gz 547.5 kB With provenance Details for qrcode_barcode_scanner-0.11.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for qrcode-barcode-scanner 0.11.0
File Actions
qrcode_barcode_scanner-0.11.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for qrcode_barcode_scanner-0.11.0-cp38-abi3-win_amd64.whl
qrcode_barcode_scanner-0.11.0-cp38-abi3-musllinux_1_2_x86_64.whl CPython 3.8 abi3 Linux musl 1.2+ x86-64 Details for qrcode_barcode_scanner-0.11.0-cp38-abi3-musllinux_1_2_x86_64.whl
qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details for qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_11_0_arm64.whl
qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details for qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_10_12_x86_64.whl

Total release size: 12.7 MB

Release files / qrcode_barcode_scanner-0.11.0.tar.gz

Download URL qrcode_barcode_scanner-0.11.0.tar.gz
Size 547.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1ca488eaa04eec33022cf7211221c888b2ea8b00d3889e68b2ae8e5e066d1f03
BLAKE2b-256 checksum
How to use checksums
573d4a7101be8ef675b887c2ca781054b2ed12a85932be03d100750bbe773fe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qrcode_barcode_scanner-0.11.0-cp38-abi3-win_amd64.whl

Download URL qrcode_barcode_scanner-0.11.0-cp38-abi3-win_amd64.whl
Size 1.8 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d5377cc3c9f6e492014d7df44c84d60cc7fbe68327542aef5bcad2b7659868ae
BLAKE2b-256 checksum
How to use checksums
3e172a3f407ba8a01b8c95ceb2d2c73adc745f9dfb8a5d826a4aedf66fbe254f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qrcode_barcode_scanner-0.11.0-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL qrcode_barcode_scanner-0.11.0-cp38-abi3-musllinux_1_2_x86_64.whl
Size 2.3 MB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
346f7ea57a31c0b034e8a4ddc1c6c67604e0ebcfb1336401119c10b2248515bb
BLAKE2b-256 checksum
How to use checksums
489edafc8133b1841790376ffeec887bd10a77a3b3fc22ffa8c1f356e1c96895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.1 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3046df24c36a3a677b506733e990b4f0d59f5bf7117fcf197d5355e732a133a7
BLAKE2b-256 checksum
How to use checksums
97ce17eeed3570f060698974884940c13678f0c347c7162b9b0df2bc02da7390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL qrcode_barcode_scanner-0.11.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.0 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
dca71ac3beb4d4b85a21e7d8fe8a3493850fde7e0c3b425e30037991df7fa6df
BLAKE2b-256 checksum
How to use checksums
5c006ff6db147c35954942954c120b270eaab2d7ae22f116cc5a7ce6ea6713b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
400e8173f91ecaa54cd160c94c3e487c533e97f4915e6956071a0417ff6fe822
BLAKE2b-256 checksum
How to use checksums
0a10fe148fdcfc1585452e8098e1f26e01edc54fa72481fc05f8b0d127f13612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_10_12_x86_64.whl

Download URL qrcode_barcode_scanner-0.11.0-cp38-abi3-macosx_10_12_x86_64.whl
Size 2.0 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
67a7f03b90dff3685d213d5377856656f7c1a26dc253b7aaf3048b18d576b98a
BLAKE2b-256 checksum
How to use checksums
ef904b27a1eb56ab203ba9e4733fe8f9b273ca69ac10c0594b28f7517775f320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for qrcode-barcode-scanner 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for qrcode_barcode_scanner-0.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11.0 This release

7 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page