Python port for kozakdenys/qr-code-styling
Project description
[WIP] QRCode Styled Generator
This is a python port for a browser QRCode generator by Denys Kozak
from qrcode_styled import QRCodeStyled
qr = QRCodeStyled()
# Save to file
with open('test.webp', 'wb') as _fh:
qr.get_image('payload').save(_fh, 'WEBP', lossless=False, quaility=80, method=2)
# Get to BytesIO buffer
qrcode = qr.get('payload', _format='WEBP', lossless=False, quality=80, method=2)
# Also supports basic asyncio workaround
async def main():
with open('test.webp', 'wb') as fh:
img = await qr.get_image_async('payload')
img.save(fh, 'WEBP', lossless=False, quaility=80, method=2)
qrcode = await qr.get_async('payload', _format='WEBP', lossless=False, quality=80, method=2)
# You may put Image in the center of a QR Code
from PIL import Image
im = Image.open('image.png')
qrcode = qr.get('payload', im, _format='WEBP')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qrcode_styled-0.1.0.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for qrcode_styled-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c4ab172f595c7a48d50544010dd66c1477d8122ae364d11bee48ba0d2261ee |
|
MD5 | 1ac818dd3dd7ec001fa446b83c6b3964 |
|
BLAKE2b-256 | 0213cbbba331aa93381037e43170692ea9cb3851d433f9223dab0b7223bfc0aa |