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]
payload[source]
border = 4[source]
box_size = 10[source]
fill_color = 'black'[source]
back_color = 'white'[source]
img_format = 'png'[source]
encoding = None[source]
classmethod from_payload(payload: str | bytes) io.BytesIO[source]
property image: io.BytesIO[source]

Create an image from the payload

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