
Overview
Wanna generate QR codes quickly for your business? Try reading this blog. Here is a simple way using a few python codes.
Introduction
QR codes or Quick Response code is an amazing technology that you can run into so casually in your daily life. Nowadays it is seen almost everywhere from shopping centres to magazines. It can be used in making easy payments, for sending messages and wishes or even to retrieve information. How about creating one for yourself? Here is a quick way to generate one using simple python codes.
Libraries Required
We need QR code library as well as PIL library . To install them run the below commands.
- pip3 install qrcode
- pip3 install image
Let’s Code
import qrcode
data = "https://wwww.tech-rover.in"
outfile = "website.png"
img = qrcode.make(data)
img.save(outfile)
Output

Conclusion
We have generated QR code with 5 lines of code. You can even simplify this to 3 lines of code. Also you can embed this functionality to web frameworks like Django or Flask .
Hope you found what you have been looking for. This blog is about something which is becoming more and more common in the digital world.
Recent Comments