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:

myqr code

 

By cbsepython

A complete solution for the students of class 9 to 12 having subject Information Technology (402), Computer Science (083). Explore our website for all the useful content as Topic wise notes, Solved QNA, MCQs, Projects and Quiz related to the latest syllabus.

Copywrite © 2020-2024, CBSE Python,
All Rights Reserved