Generate Your own Qrcode in Python with just 10 Lines Of Code:
QRcode Generator in Python In 10 Lines Of Code:
Lets Start:
Make Your own qrcode generator for your websites, Facebook, Gmail, Your any online thing, and your Game Id to share with friends and also all over the world like other qrcodes.....
How Make QRcode generator in 5 lines in Python Programming Language?
How many libraries used in Qr code? &
How to install Libraries?
In which application we can create or QRcode like bellow pic?
So your all question are here! Don't worry I am here lets start:...
First Of All You have need just Two libraries which is "QRcode" & "Image"
Before the installation of libraries you must have Internet connection.
How to install these ?
Search Command Prompt "CMD" & (Window +R)
And then
Write/code for QRcode --> (pip install qrcode)
I have already installed qrcode library.
So
After the QRcode installation
Write for image --> (pip install image)
When you install it then you go to any Python IDLE (like PyCharm )
and create new project with any name.
Code:
import qrcode
import image
qr = qrcode.QRCode(
version=15, #15 means the version of qr code
box_size=10, #size of the box where qr code will displayed
border=5 #it is the white part of image border is covered in 4 sides in white border
)
data= "https://learningstudywithus.blogspot.com/"
# in the bellow like means data you should place any path/ link.
# otherwise you put the data like data="Hello"
qr.add_data(data)
qr.make(fit=True)
img = qr.make_image(fill="black",back_color="white")
img.save("All About IT .png")
Python fill created Qrcode Project libraries.
OutPut:
# where your python file is situated the qrocde image will automatically created in the same location.
If you have any problem about this project or about any other problem then just leave your comment here.
Please keep Supporting on My YouTube Channel.
If you like this Blog than share with others.
Do you want to learn about Python/C/C++ and other computer relative subjects than follow this Channel link Computer Knowledge.
Thanks For Coming
Post a Comment