Generate QR Code using Python

How to Generate QR Code using Python?

 

#pip install pyqrcode
#pip install pypng
# Import QRCode from pyqrcode
import pyqrcode
import png
from pyqrcode import QRCode


# String for which website you want to enerate the QR code
website_url = "https://cbsepython.in/"

# Generate QR code
url = pyqrcode.create(website_url)


# Create and save the png file naming "myqr_code.png"
url.png('myqr_code.png', scale = 10)

 

Output: