Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ananyag309 authored Oct 3, 2024
1 parent 4110b6a commit a5b421f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Beginner_Projects/QR Generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## **QR Code Generator**

### 🎯 **Goal**

This script take a link of any URL and generate a QR code corresponding to it.

Library Used:
[qrcode](https://github.com/lincolnloop/python-qrcode)


### 🧾 **Description**

The QR Code Generator script creates a QR code based on the input URL. Users can customize the size, error correction level, and color of the QR code. The generated QR code is saved as an image file and can be used for scanning or sharing the URL.

### 🚀 **Models Implemented**

- Provide your desired URL in the script
- Execute `python3 generate_qrcode.py`


### 📢 **Conclusion**

`This script efficiently generates a customized QR code for any input URL, allowing for color customization and easy storage as an image.`

### ✒️ **Your Signature**


`Ananya Gupta`
[GitHub Profile](https://github.com/ananyag309)




18 changes: 18 additions & 0 deletions Beginner_Projects/QR Generator/generate_qrcode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import qrcode

input_URL = "https://www.google.com/"

qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=15,
border=4,
)

qr.add_data(input_URL)
qr.make(fit=True)

img = qr.make_image(fill_color="red", back_color="white")
img.save("url_qrcode.png")

print(qr.data_list)

0 comments on commit a5b421f

Please sign in to comment.