A QR Code Generator built with Python that supports:
β
Generate multiple QR codes at once
β
Custom QR color + background color
β
Supports PNG / JPG output formats
β
URL validation + auto-add https:// for domains
- Generate QR codes from:
- URLs (validated)
- Plain text
- Auto-correct URLs:
amazon.comβhttps://amazon.com
- Saves each QR code with a unique filename:
qr_1.png,qr_2.png, etc.
Clone the repo:
git clone https://github.com/<your-username>/qr-code-generator.git
cd qr-code-generator
Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txtpython src/qr_generator.pypytest -vEnter QR color (default: black): blue
Enter background color (default: white): white
Choose file type (png/jpg) [default: png]: png
Enter text/URL(s): amazon.com, https://aws.amazon.com, Hello World
Enter base filename (example: qr_code): my_qr
Output files:
my_qr_1.png
my_qr_2.png
my_qr_3.png- Python 3
- qrcode + Pillow
- pytest
MIT License