A Python-based QR code generator that allows you to create QR codes with embedded logos and custom colors. This tool can be run using Docker, virtual environment, or as a standalone Python application.
For Docker:
- Docker installed on your system
For venv/standalone:
- Python 3.8 or higher
- pip (Python package installer)
Clone the repository or download the source code:
git clone <repository-url-using-https-or-ssh>
cd qrgenBuild the Docker image:
docker build -t qrgen .Run the Docker image and generate default qr code:
docker run -v $(pwd):/app qrgen python makeqrCreate and activate a virtual environment:
On macOS/Linux:
python -m venv venv
source venv/bin/activateOn Windows:
python -m venv venv
venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtpython makeqrInstall dependencies globally:
pip install -r requirements.txtpython makeqr--logo: Path to the logo image file (optional)--url: The URL or text to encode in the QR code (default: https://www.geeksforgeeks.org/)--color: The color of the QR code (default: Green)--basewidth: The base width of the logo image (default: 100)
The generated QR code will be saved in the current directory with the following naming convention:
- With logo:
{logo_name}_with_QR.png - Without logo:
qr_code_with_QR.png
(If you are running Docker, prepend each of these with docker run -v $(pwd):/app qrgen )
python makeqr --url "https://example.com" --color "Blue"python makeqr --logo "logo.png" --url "https://example.com" --color "Red" --basewidth 150python -m unittest test_helpers.py -vGNU GENERAL PUBLIC LICENSE