Skip to content

izag8216/qrforge

Repository files navigation

qrforge

Python License Tests PyPI


English | 日本語


What is qrforge?

qrforge is a local, watermark-free QR code generator with full visual customization.

Default QR codes are boring black-and-white squares. qrforge lets you create branded, styled QR codes with rounded modules, custom colors, gradients, embedded logos, and more -- entirely offline, no tracking, no watermarks.

Features

  • 4 module styles: square, rounded, dots, diamond
  • Color & gradient support: solid fills or diagonal gradients
  • Logo embedding: overlay your brand logo in the center
  • Multiple formats: PNG, SVG, ASCII art
  • Batch generation: generate hundreds from a CSV file
  • Error correction: L / M / Q / H levels
  • 100% local: no network calls, no data leaves your machine

Installation

From PyPI (recommended)

pip install qrforge

From source

git clone https://github.com/izag8216/qrforge.git
cd qrforge
pip install -e ".[dev]"

Quick Start

Generate a basic QR code

qrforge generate "https://example.com" -o qr.png

Custom style and color

qrforge generate "https://example.com" -o qr.png \
  --style rounded \
  --color "#2D5A27" \
  --background "#f0fdf4"

Gradient fill

qrforge generate "https://example.com" -o qr.png \
  --gradient "#ff0000-#0000ff"

Embed a logo

qrforge generate "https://example.com" -o qr.png \
  --logo brand.png \
  --error-correction H

SVG output

qrforge generate "https://example.com" -o qr.svg --style dots

ASCII art

qrforge generate "https://example.com" -o qr.txt --ascii

Batch from CSV

Create urls.csv:

data,filename,style,color
https://a.com,a,square,#000000
https://b.com,b,rounded,#ff0000

Run:

qrforge batch urls.csv -o ./output/ --format png

CLI Reference

qrforge generate [OPTIONS] DATA

Options:
  --style [square|rounded|dots|diamond]
  --color TEXT                Foreground color (hex)
  --background TEXT           Background color (hex)
  --gradient TEXT             Gradient '#color1-#color2'
  --error-correction [L|M|Q|H]
  --size INTEGER              Output size in pixels
  --logo PATH                 Logo image path
  --logo-ratio FLOAT          Logo size ratio
  -o, --output PATH           Output file (required)
  --ascii                     Output ASCII art
  --help                      Show this message and exit.

API Usage

from qrforge.generator import create_qr_code
from qrforge.renderer import render_png
from qrforge.styles import ModuleStyle

qr = create_qr_code("https://example.com", error_correction="H")
img = render_png(
    qr,
    style=ModuleStyle.ROUNDED,
    color="#2D5A27",
    background="#ffffff",
    size=512,
)
img.save("qr.png")

Development

pip install -e ".[dev]"
pytest

License

MIT License -- see LICENSE file.

Third-party licenses: THIRD_PARTY_LICENSES.md

Contributing

See CONTRIBUTING.md.

About

QR Code Generator with Custom Styling -- beautiful, local, watermark-free

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages