qrcode.model

Classes

QrCode

Generates QR Codes

Module Contents

class qrcode.model.QrCode(payload: str | bytes, border: int | None = None, box_size: int | None = None, fill_color: str | None = None, back_color: str | None = None, img_format: str | None = None, encoding: Literal['base64'] | None = None)[source]

Generates QR Codes

_border = 4[source]
_box_size = 10[source]
_fill_color = 'black'[source]
_back_color = 'white'[source]
_format = 'png'[source]
_encoding = None[source]
classmethod from_payload(payload: str | bytes) io.BytesIO[source]
image() io.BytesIO[source]

Create an image from the payload

encoded_image() bytes[source]
property content_type: str[source]