Skip to content

vnigam12/qr-code-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Œ QR Code Generator (Python)

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

πŸš€ Features

  • 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.

πŸ“¦ Installation

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.txt

▢️ Run the program

python src/qr_generator.py

πŸ§ͺ Run tests

pytest -v

πŸ“ Example Input

Enter 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

πŸ›  Tech Stack

  • Python 3
  • qrcode + Pillow
  • pytest

πŸ“„ License

MIT License

About

QR code generator built with Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages