This script allows you to generate QR codes for a given input data using the qrcode
Python library.
- Python 3.x
qrcode
library (you can install it usingpip install qrcode[pil]
)
-
Clone or download this repository to your local machine.
git clone https://github.com/nikhitkumar00/QR-Code-Generator.git
-
Navigate to the project directory.
cd qr-code-generator
-
Install the required dependencies.
pip install -r requirements.txt
-
Run the script using Python.
python generate_qr_code.py
-
Enter the data for which you want to generate a QR code when prompted.
Enter the data for the QR code: <your-data-here>
-
The script will generate a QR code and save it as
qrcode.png
in the same directory. -
A success message will be displayed.
QR code saved as qrcode.png
You can customize the QR code generation by modifying the parameters in the script:
version
: The version of the QR code (1-40), affecting the size and data capacity.error_correction
: The error correction level (constants fromqrcode.constants
).box_size
: The size of each box (module) in the QR code.border
: The size of the border around the QR code.fill_color
: The color of the QR code modules.back_color
: The background color of the QR code.
Refer to the qrcode
library documentation for more information on available options.