Skip to content

Instantly share code, notes, and snippets.

@adieltan
Created July 2, 2021 12:20
Show Gist options
  • Save adieltan/b23caf69759075ca4ff99e2751d8f6bd to your computer and use it in GitHub Desktop.
Save adieltan/b23caf69759075ca4ff99e2751d8f6bd to your computer and use it in GitHub Desktop.
QR Creator
#pip install qrcode[pil]
import os
import qrcode
text = input("Input text:")
ver = int(input("Version (1-40):"))
qr = qrcode.QRCode(
version=ver,
box_size=10,
border=3)
qr.add_data(text)
qr.make(fit=True)
img = qr.make_image(fill='black', back_color='white')
img.save('qrcode001.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment