Coders Packet

PYTHON QR (Quick Response) Code Generator

By Krishna Prasad Deekonda

This packet gives us an idea of how to generate QR code in Python for given data/information such as URLs

Modules used:




First of all we need to make sure that our Python IDE has pip installed in it if not installed download file from the web in the same directory as Python is installed and then we can install required modules in our IDE Terminal as in this case using

                       pip install qrcode

                       pip install image   commands

once the  modules are installed we can import them into our code and supply info/data for which we generate QR Code

Source Code:

import qrcode
import image
QR = qrcode.QRCode(
    version = 15,
    box_size = 8,
    border = 7
web_site = ""
QR.make(fit = True)
img = QR.make_image(fill = "black", back_color = "white")"WEBSITE_QRCODE.jpg")

Here in the code I have Provided URL for my Personal Blog and you can customise it as per your requirement

Generated QR:

On running this Code in our IDE QR_CODE Image (.jpg format)is saved in the same directory in which the python file is saved

Download Complete Code


No comments yet