QR Code Generator using Python
By Bommala Shreya
This project allows you to create QR codes, which are two-dimensional bar codes that can be scanned by smartphones or other devices to quickly access information.
Generate a QR Code using Python
Understanding the QR Code
- QR code is a machine-readable barcode designed in two-dimensional pixelated form.
- The QR code can be used to store a range of data.
- QR in QR code is abbreviated for Quick Response.
- QR code was invented in the year 1994 by Masahiro Hara, a Japanese engineer from Automobile Manufacturer Denso Wave, in order to track the movement of car parts.
- The popularity of the QR code has increased in the later 2010s with improvement in optical proficiencies of Mobile Phones and their extensive acceptance.
- At the moment, QR codes are being utilized for a wide range of applications such as making online payments, checking hotel menus, sharing Wi-Fi passwords, obtaining cost and other information of products, and a lot more.
- QR codes have become so famous that now every new smartphone comes with a built-in QR code reader.
Program code:
pip install pyqrcode
pip install pypng
import pyqrcode
import png
from pyqrcode import QRCode
s = "codespeedy.com"
url = pyqrcode.create(s)
# Create and save the svg file naming "myqr.svg"
url.svg("myqr.svg", scale = 8)
# Create and save the png file naming "myqr.png"
url.png('myqr.png', scale = 6)
Used google colaboratory for executing the code . The below zip file has the code execution part.
Comments