mirror of
https://github.com/koloideal/Quizzi.git
synced 2026-06-10 10:25:28 +03:00
11 lines
189 B
Python
11 lines
189 B
Python
import io
|
|
|
|
import qrcode
|
|
|
|
|
|
def generate_qr_bytes(text: str) -> bytes:
|
|
img = qrcode.make(text)
|
|
with io.BytesIO() as buffer:
|
|
img.save(buffer)
|
|
return buffer.getvalue()
|