import qrcode, os def createQrCode(data, name): img = qrcode.make(data) type(img) img.save(os.getcwd() + '/app/static/uploads/' + str(name) + '.png')