Swish QR Code Python Library


License
MIT-feh
Install
pip install swish-qr==0.3.5

Documentation

Swish QR Code

Test Codecov Package version Supported Python versions

Generate Swish styled QR Code as SVG or PNG image.

Example

Installation

pip install swish_qr

Usage

from swish_qr import generate_swish_code

# save to svg
svg_bytes = generate_swish_code("0123456789", 100.99, "Test message!", format="svg")
with open("example.svg", "wb") as f:
    f.write(svg_bytes)

# save to png
png_bytes = generate_swish_code("0123456789", 100.99, "Test message!", format="png")
with open("example.png", "wb") as f:
    f.write(png_bytes)