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[source]
box_size[source]
fill_color[source]
back_color[source]
img_format[source]
encoding[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]