BLOG 17: MADDNESS QR CODES

Today I made a QR Code Generator

import qrcode
import qrcode.image.svg

method = input("What method? (basic, fragment, path): ")
kyle = input("Input Link: ")

This is the code for the Inputs and Imports

if method == 'basic':
    factory = qrcode.image.svg.SvgImage
elif method == 'fragment':
    factory = qrcode.image.svg.SvgFragmentImage
else:
    factory = qrcode.image.svg.SvgPathImage

This is the Input choices for the Methods

img = qrcode.make(kyle, image_factory=factory)

img.save('some_file.svg')

This is the code that makes the QR code then saves it as a file

QR code made by code

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top