I have a couple of use cases for simple qr codes in python coming up. One is for blog posts, the other is for auth into a new server application logged to a terminal. I tried the qrcode library and it does not look as nice to me and I found pyqrcode to be quite nice.


import pyqrcode
url = pyqrcode.create('https://waylonwalker.com/qr-codes-in-python')
url.svg('qr-codes-in-python.svg', scale=8)
print(url.terminal(quiet_zone=1))
url.svg('qr-codes-in-python.svg', scale=12)
url.svg('qr-codes-in-python.svg', omithw=True) # width is controlled by the container

url.svg('qr-codes-in-python.svg', omithw=True, module_color='#ffd119')
url.svg('qr-codes-in-python.svg', omithw=True, module_color='#ff69b4', background='#2b034c')

result #

Here is the final svg result.

Here is what it looks like in the terminal.

screenshot-2025-08-05T13-53-17-368Z.png

If you want fancier qrcodes check out https://mydigitalharbor.com/