Generate QR code using Python's "qrcode"

If you use the Python "qrcode" used in this article, It was convenient because I could easily create a QR code, so I will summarize it. I have both Python v2.7.10 and v3.5.0 installed, but the Python I'm using this time is v3.5.0.

Install Python image processing libraries "Pillow" and "qrcode"

$ pip3 install pillow qrcode Now you can use the qr command.

Start Python and generate QR code with Python API

Use the qr command to actually generate the QR code via the Python API.

$ python3
>>> import qrcode #Start qrcode
>>> img = qrcode.make('hoge') #''Convert the characters in to QR code
>>> img.show() #Display the generated QR code
>>> img.save('qr_img.png') #Save the QR code as

Easy! Easy! that's all!

Recommended Posts

Generate QR code using Python's "qrcode"
Command to generate QR code
Generate QR code in Python
[Python] Generate QR code in memory
QR code display
Command to generate QR code
Generate QR code in Python
Decrypt the QR code with CNN
[Python] Generate QR code in memory
Generate QR code using Python's "qrcode"
QR code display
Try using a QR code on a Raspberry Pi
Try using Python's feedparser.
Try using Python's Tkinter
Exception handling using Python's ZeroDivisionError
Send email using Python's smtplib
Generate OCI architecture diagrams using Diagrams