Comparison of Python QR Code libraries¶
Features¶
Description |
|||
---|---|---|---|
Library license |
|||
Library version |
7.4.2 |
1.8.0 |
1.6.2.dev |
Mode Numeric |
Yes |
Yes |
Yes |
Mode Alphanumeric |
Yes |
Yes |
Yes |
Mode Byte |
Yes |
Yes |
Yes |
Mode Kanji |
No |
Yes |
Yes |
Mode ECI |
No |
Yes |
Yes |
Mode FNC1 |
No |
No |
No |
Mode Structured Append |
No |
No |
Yes |
Mode Hanzi [1] |
No |
No |
Yes |
Mixing modes |
Yes |
Yes |
Yes |
QR Codes version 1 - 40 |
Yes |
Yes |
Yes |
Micro QR Codes version M1 - M4 |
No |
No |
Yes |
Output acc. to ISO/IEC 18004:2015(E) Fig. 1 [2] |
|||
Find maximal error correction level |
No |
Yes |
Yes |
Optimize QR Codes |
Yes |
No |
No |
PNG output |
Yes |
No |
Yes |
SVG output |
Yes |
No |
Yes |
EPS output |
Yes |
No |
Yes |
PDF output |
Yes |
No |
Yes |
PAM output |
No |
No |
Yes |
PBM output |
Yes |
No |
Yes |
PPM output |
Yes |
No |
Yes |
LaTeX support |
No |
No |
Yes |
XBM output |
Yes |
No |
Yes |
XPM output |
No |
No |
Yes |
PNG data URI |
No |
No |
Yes |
SVG data URI |
No |
No |
Yes |
Text output |
Yes |
No |
Yes |
ANSI escape code output |
Yes |
No |
Yes |
Other output formats (i.e. JPEG) |
Yes |
No |
Yes via plugin |
Black and white QR Codes |
Yes |
Yes |
Yes |
Colored QR Codes |
Yes |
No |
Yes |
No |
No |
Yes via plugin |
|
Changing size of modules (scaling factor) |
Yes |
No |
Yes |
Command line script |
Yes |
No |
Yes |
Plugins |
No |
No |
Yes |
Default encoding in Byte mode |
ISO/IEC 8859-1 or UTF-8 |
ISO/IEC 8859-1 or UTF-8 |
ISO/IEC 8859-1 or UTF-8 |
3rd party dependencies |
Pillow or Pymaging and Pymaging-PNG (Windows: colorama) |
Performance¶
Some performance indicators. The script benchmarks.py ran on Intel i7-8559U / CPython 3.11. Each SVG / PNG image uses a scaling factor of 10 (aside from qrcodegen which does not support any scaling).
Create a 1-M QR code¶
1-M QR code encoding “QR Code Symbol”
Create a 7-Q QR code¶
7-Q QR code encoding “QR Code Symbol”
Create a 30-H QR code¶
30-H QR code encoding “QR Code Symbol”
Create a QR code and serialize it as SVG¶
Create a QR code 1-M “QR Code Symbol” and serialize it as SVG document.
Create a QR code and serialize it as PNG¶
Create a QR code 1-M “QR Code Symbol” and serialize it as PNG image.
The comparison included PyQRCode in all years before 2022. In the meantime, six years have passed without any updates and PyQRCode has lost its connection in many aspects.
Although popular, it lost all feature and performance comparisons, therefore it is no longer part of this comparison.