Skip to main content

Partial QR Code Decoder

An aggressive QR code decoder that can recover data from partially missing or damaged QR codes.

Usage

partial-qr --input path/to/qr_code_matrix.txt

The input must be either a text file, containing a matrix of characters, or an image file.

When the input is a text file, the content must be a grid of characters, where each character is one of:

  • #, X, 1 - representing a black module
  • , ., 0 - representing a white module
  • ? - representing the unknown cells that the decoder will try to recover

When the input is an image file, the program will try to detect the size of the QR code, but it can sometimes misdetect it, and in that case, the --qr-version option can be used to specify the version of the QR code (1-40). The image must only contain the QR code, in a well-aligned grid with no perspective distortion. Recognizing QR codes from photographs or heavily distorted images is not in the scope of this project, and will not be supported. Each cell in the QR image must be close to a solid black, solid white, or middle gray color, and the program will classify them as black, white, or unknown based on a simple thresholding of the lightness.

If the input is too corrupted, bruteforce strength can be increased, but beware of the exponential runtime increase, especially for higher versions:

partial-qr --input path/to/qr_code_matrix.txt --max-brute-bits 24

Additional hints can be provided to the bruteforce to speed it up:

--ascii - Assume the data is ASCII, which reduces the search space significantly.

--url - Assume the data is a URL, so it must start with either http:// or https://.

--parallel - Enable parallel bruteforce using all available CPU cores.

Metadata

Release files for partial-qr 1.0.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 partial-qr 1.0.0
File Size Uploaded Provenance Actions
partial_qr-1.0.0.tar.gz 29.0 kB Without provenance Details for partial_qr-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for partial-qr 1.0.0
File Interpreter ABI Platform Actions
partial_qr-1.0.0-py3-none-any.whl Python 3 none any Details for partial_qr-1.0.0-py3-none-any.whl

Total release size: 62.4 kB

Release files / partial_qr-1.0.0.tar.gz

Download URL partial_qr-1.0.0.tar.gz
Size 29.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8cf9e1a3651ea06b4da139e67281cdb9e9330da6495addc6e7238306d186d865
BLAKE2b-256 checksum
How to use checksums
ee638cb7d62d000220c0857ab9848e7495a25ea6bc39a1c259818a4c156b9cd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / partial_qr-1.0.0-py3-none-any.whl

Download URL partial_qr-1.0.0-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d1704f59b9142975dd0bad74f761d8154dd16031bd3ae11980ef3f7e0ae0cfe
BLAKE2b-256 checksum
How to use checksums
bc6f9620915c86055b6c5f22f5ded556f18f7cb6e72aed5911fe9c7f70e8c3c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for partial-qr 1.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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