app.utilities.qr

QR code generation utilities for the Mail List Shield application.

This module provides functions for generating QR codes, primarily used for two-factor authentication setup.

Functions

qrcode_img_src(qr_string)

Generate a base64-encoded QR code image as a data URI.

Module Contents

app.utilities.qr.qrcode_img_src(qr_string)[source]

Generate a base64-encoded QR code image as a data URI.

Creates a QR code from the given string and returns it as a base64-encoded PNG image suitable for use in an HTML img src attribute.

Parameters:

qr_string – The string to encode in the QR code.

Returns:

A data URI string containing the base64-encoded PNG image.

Return type:

str