Kinsa | Pixels + Logic Blog

Generate a QR Code with Python

Install the Pillow and QRCode packages

$ pip install pillow qrcode

Then, in a Python script:

import qrcode

img = qrcode.make('')'/abs/path/to/file.png')

Or, even better, straight out of the docs, from the command line, run:

$ qr "Some text" > test.png


Email us at

Found this useful?

We always appreciate a pint!