mirror of
https://github.com/koloideal/Quizzi.git
synced 2026-06-10 18:35:28 +03:00
Initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import io
|
||||
|
||||
import qrcode
|
||||
|
||||
|
||||
def generate_qr_bytes(text: str) -> bytes:
|
||||
"""Generate QR code as PNG bytes."""
|
||||
img = qrcode.make(text)
|
||||
with io.BytesIO() as buffer:
|
||||
img.save(buffer)
|
||||
return buffer.getvalue()
|
||||
Reference in New Issue
Block a user