Created
January 2, 2017 16:01
-
-
Save ddahan/c9ec4df39e54dae1d1b7709b4f6f7836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def data_to_qrcode(data): | |
''' Return a qrcode image from data ''' | |
qrc = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_Q, | |
box_size=8, | |
border=0) | |
qrc.add_data(data) | |
qrc.make(fit=True) | |
img = qrc.make_image() | |
return img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment