function.urlencode

function.urlencode

from urllib.parse import urlencode ¶

image = { ¶
'cht': 'qr', ¶
'chs': '500x500', ¶
'chl': enrollment_token['qrCode'] ¶
} ¶

qrcode_url = 'https://chart.googleapis.com/chart?' + urlencode(image) ¶

print('Please visit this URL to scan the QR code:', qrcode_url)