A simple Python script to generate QR codes from text or URLs.
-
Clone the Repository
git clone https://github.com/yourusername/qr-code-generator.git cd qr-code-generator
-
Install Dependencies
The script requires the
qrcode
andPillow
libraries. Install them using pip:pip install qrcode[pil]
Run the QR code generator script using Python:
python main.py
-
Enter the Data for the QR Code
Input the text or URL you want to encode.
Enter the data for the QR code: https://www.example.com
-
Enter the Filename to Save the QR Code
Specify the name of the image file (e.g.,
myqr.png
).Enter the filename to save the QR code (e.g., qrcode.png): example_qr.png
-
Result
After running, the script will generate a QR code image with the provided data and save it to the specified file.
QR code generated and saved as example_qr.png