Skip to main content

The upgraded qrcode library for Python

Project description

image Python Version License PyPI - Version PyPI - Downloads Hours Spent

BetterQR

BetterQR is a powerful and versatile Python library for generating beautiful, scannable QR codes with zero external QR dependencies. It offers extensive customization options, including various shapes, colors, gradients, embedded logos, frames, labels, and even animated QR codes.

Features

  • Pure Python: No external QR code generation libraries required.
  • Highly Customizable: Make QR codes in any shape (square, circle, rounded, diamond, star, gapped, vertical bar, horizontal bar), with custom colors and backgrounds.
  • Logo Embedding: Easily embed any logos / image into the center of the QR codes.
  • Decorative frames and labels: Add stylish frames and text labels above or below the QR codes.
  • Animated QR codes: Generate animated GIFs of the QR codes with effects like shimmer, fade, scan, pulse and more.
  • Data Types: Conveniently generate QR codes for WI-FI, vCards, MeCards, Geo-Locations, SMS, Email and Phone Numbers.
  • CLI Support: Generate QR codes directly from your terminal.
  • Multiple Output Formats: Save QR codes as PNG, JPG, SVG, or GIF (for animations).

Installation

BetterQR can be installed directly from PyPI using pip:

pip install betterqr --upgrade

Quick Start

Command Line Interface (CLI)

Generate a basic QR code:

betterqr "https://example.com"

Generate a styled QR code with a logo:

betterqr "https://mysite.com" --logo logo.png --ecc H --shape circle --fill "#6C3082" --back "#F3E8FF" styled_qr.png

Generate an animated QR code:

betterqr "Hello World" animated_qr.gif --effect matrix --fps 12

Python Library

from betterqr import QR, WiFi, VCard

# Basic QR code
QR("https://example.com" ).save("qr_basic.png")

# Styled QR code
QR("https://example.com" ).style(shape="circle", fill="#6C3082").save("qr_styled.png")

# QR code with gradient
QR("Hello Gradient").gradient("#FF6B6B", "#4ECDC4", direction="radial").save("qr_gradient.png")

# QR code with logo (ensure 'logo.png' exists)
# For best results with logos, use ECC level H
QR("https://mysite.com", ecc="H" ).logo("logo.png", ratio=0.3, shape="rounded").save("qr_logo.png")

# Animated QR code
QR("Animated QR").animate(effect="shimmer", frames=30, fps=20).save("qr_animated.gif")

# Wi-Fi QR code
QR(WiFi("MyNetwork", "MyPassword", security="WPA")).save("qr_wifi.png")

# vCard QR code
QR(VCard("Jane Doe", phone="+1-555-1234", email="jane@example.com")).save("qr_vcard.png")

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines on how to contribute to BetterQR.

License

BetterQR is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

betterqr-1.0.0.tar.gz (37.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

betterqr-1.0.0-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file betterqr-1.0.0.tar.gz.

File metadata

  • Download URL: betterqr-1.0.0.tar.gz
  • Upload date:
  • Size: 37.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for betterqr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 958908ed3da5d1c1fdb2a5716f357f00eda97a8799f9ce5b1db5ece6c0cf08d8
MD5 9df04ba66182ad58fe0b40dd35ecbc47
BLAKE2b-256 6f5c9b2c2464a63e17cb58f7ffb6476ac9c905c9fec76b75cc7bbe694b7302a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for betterqr-1.0.0.tar.gz:

Publisher: pypi-publish.yml on DevX-Dragon/betterqr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file betterqr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: betterqr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for betterqr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3135755957daf8870d978c7112e4e43f743ba85645031841d2593b24c0148cd9
MD5 84f00d1c23a3cda710ab3c7cfc60bbfa
BLAKE2b-256 aec55b0831a1834e11b6f733cf774b2a2d03a004c152be8ed535c8be0d57d1bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for betterqr-1.0.0-py3-none-any.whl:

Publisher: pypi-publish.yml on DevX-Dragon/betterqr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page