BetterQR
BetterQR is a powerful, pure-Python QR code generator with zero external QR Generation dependencies.
It generates beautiful, scannable codes with full control over shapes, colours, gradients,
embedded logos, animated GIFs, Micro QR, and more.
Features
| Feature | Details |
|---|---|
| Standard QR | Versions 1–40, ECC L / M / Q / H |
| Micro QR | All versions M1–M4 with correct auto-version selection |
| Module shapes | square, circle, rounded, diamond, star, gapped, vertical_bar, horizontal_bar |
| Colours | 6-char or 3-char hex (#F00), transparent background, separate finder colour |
| Gradients | horizontal, vertical, diagonal, radial |
| Logo embedding | square / rounded / circle shape, optional border, ratio 0.1–0.35 |
| Frames & labels | simple, rounded, double, shadow, fancy; label above or below |
| Animations | 10 GIF effects: shimmer, fade, scan, pulse, build, matrix, wave, blink, typewriter, rotate |
| Data helpers | WiFi, VCard, MeCard, GeoLocation, SMS, Email, Phone, Crypto |
| Output formats | PNG, JPG, SVG, GIF |
| CLI | Full-featured command-line tool |
Installation
pip install betterqr --upgrade
Why BetterQR?
| BetterQR | qrcode |
segno |
|
|---|---|---|---|
| Zero external QR-gen dependencies | ✅ | ✅ | ✅ |
| Module shapes (circle, star, diamond, etc.) | ✅ | ❌ | ❌ |
| Gradients | ✅ | ❌ | ❌ |
| Logo embedding | ✅ | Manual (Pillow) | ❌ |
| Frames & labels | ✅ | ❌ | ❌ |
| Animated GIF output | ✅ | ❌ | ❌ |
| Micro QR (M1–M4) | ✅ | ❌ | ✅ |
| WiFi / vCard / MeCard / SMS / Email / Phone helpers | ✅ | ❌ | Partial |
| CLI included | ✅ | ✅ | ✅ |
| SVG / PDF / EPS output | ✅ | SVG only | ✅ |
Quick Start
CLI
# Basic QR code
betterqr "https://example.com" my_qr.png
# Micro QR (auto-selects smallest version)
betterqr "HELLO" --type micro micro.png
# Styled with gradient
betterqr "Hello" my_qr.png --gradient "#FF6B6B" "#4ECDC4" --gradient-dir radial
# With logo (use ECC H for logos)
betterqr "https://mysite.com" qr.png --logo logo.png --logo-ratio 0.3 --logo-shape rounded -e H
# Animated GIF
betterqr "Animated QR" animated.gif --effect matrix --fps 12
# WiFi
betterqr --wifi MySSID MyPassword output.png
# Contact
betterqr --contact "Jane Doe" --phone "+1-555-1234" --email "jane@example.com" contact.png
Python API
from betterqr import QR, WiFi, VCard, GeoLocation, SMS, Email, Phone
# Basic
QR("https://example.com").save("qr.png")
# Micro QR — all versions
QR("1234", qr_type="micro", version=1, ecc="M").save("m1.png") # numeric only
QR("HELLO WORLD", qr_type="micro", version=3, ecc="M").save("m3.png") # alphanumeric
QR("Hello!", qr_type="micro", version=4, ecc="L").save("m4.png") # byte mode
# Styling
(QR("styled")
.style(shape="circle", fill="#6C3082", back="#F3E8FF")
.save("styled.png"))
# 3-char hex works too
QR("x").style(fill="#000", back="#FFF").save("mono.png")
# Gradient
QR("gradient").gradient("#FF6B6B", "#4ECDC4", direction="radial").save("grad.png")
# Logo (border=True adds a thin outline around the logo)
(QR("https://mysite.com", ecc="H")
.logo("logo.png", ratio=0.25, shape="rounded", border=True)
.save("logo.png"))
# Frame + label
(QR("https://example.com")
.frame("fancy")
.label("Scan Me!", position="below")
.save("framed.png"))
# Animation
QR("Hello", ecc="H", version=4).animate("matrix", frames=30, fps=15).save("anim.gif")
# Data helpers — pass the helper directly or convert to string
QR(WiFi("MyNet", "MyPass", "WPA")).save("wifi.png")
QR(GeoLocation(51.5074, -0.1278)).save("geo.png")
QR(SMS("+15550199", "Hello!")).save("sms.png")
QR(Email("hi@example.com")).save("email.png")
QR(Phone("+18005550199")).save("phone.png")
QR(VCard("Jane Doe", phone="+15550199", email="jane@example.com")).save("vcard.png")
Micro QR Capacities
| Symbol | Size | Max Numeric | Max Alpha | Max Bytes |
|---|---|---|---|---|
| M1/M | 11×11 | 5 | — | — |
| M2/L | 13×13 | 10 | 6 | — |
| M2/M | 13×13 | 8 | 5 | — |
| M3/L | 15×15 | 23 | 14 | 9 |
| M3/M | 15×15 | 18 | 11 | 7 |
| M4/L | 17×17 | 35 | 21 | 15 |
| M4/M | 17×17 | 30 | 18 | 13 |
| M4/Q | 17×17 | 21 | 13 | 9 |
Documentation
Check out the DOCUMENTATION for an better overview of BetterQR
License
Regsitred under MIT LISCENSE — see LICENSE
Metadata
Release files for betterqr 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| betterqr-2.0.0.tar.gz | 57.1 kB | With provenance | Details for betterqr-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| betterqr-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for betterqr-2.0.0-py3-none-any.whl |
Total release size: 109.8 kB
Release files / betterqr-2.0.0.tar.gz
| Download URL | betterqr-2.0.0.tar.gz |
|---|---|
| Size | 57.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36ac609399b75b4733be2e4a816cfd330139529b678b3aac264d5c4f240c25a4
|
|
BLAKE2b-256 checksum How to use checksums |
82638443cf4579e9f97272ca92a3ec787428022342ba0ba413b962a9fad4025c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 16, 2026.
Transparency logRelease files / betterqr-2.0.0-py3-none-any.whl
| Download URL | betterqr-2.0.0-py3-none-any.whl |
|---|---|
| Size | 52.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6d55b671d3e524bb3593f7950a52e5499585fde0fc6821830df08f7b999a9e5
|
|
BLAKE2b-256 checksum How to use checksums |
388ea27bb3b444f2378f49970bdc7d76daed8610a41c612c850b65f28741a9fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 16, 2026.
Transparency logSecurity for betterqr 2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for betterqr-2.0.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 Jul 16, 2026.
Transparency logA 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.