Skip to main content


QR Code In 4 lines of Python Code (Create / Read)

QR Code In 4 lines of Python Code


In this tutorial I will show you how easy it is to ...


Create QR Code


Read QR Code / Decode QR Code


Check out the video demonstrating the process


#python4fun #qrcode #python



#Filename:- Creat QR Code.py
#Required
#pip install pyqrcode
#pip install pypng

#Create Your own QR Code
import pyqrcode
import png
qr = pyqrcode.create("<YOUR TEXT / URL>")
#Scale to increase / decrease size
qr.png("myQR.png",scale=30)


#Filename:- Decoding - Reading QR Code.py
#Required
#pip install Pillow
#pip install pyzbar

from PIL import Image
from pyzbar.pyzbar import decode

# <QR Code Image> - image.jpg, image.png, image.gif
result = decode(Image.open('<QR Code Image>'))
print(result)


Comments



🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍

Popular Posts

Python underline string, Python underline text, Underline python print

Python pip - Installing modules from IDLE (Pyton GUI) for python 3.7

Top 40 Python - String Processing in Python | Working with String in Python

Top 11 Essential Python Tips and Tricks

Python Program - When was I born? / Date of Birth / MY BIRTHDAY (using Python3+)





Subscribe to our Channel


Follow us on Facebook Page

Join our python facebook groups



Join us on Telegram