Generator for SwissQR invoice qr codes
Project description
swissqr
Python lib to generate the QR code of Swiss QR bills. Check here for more details on QR bills.
Beware: This library is not well tested, use at your own risk!
Quickstart:
import pathlib
from iso4217 import Currency
from swissqr import PaymentParty, QRData, SwissQR
# Create a PaymentParty object for the payment receiver
p = PaymentParty(
name="Hambone Fakenamington",
street="Madeup Street",
street_no="1",
zipcode="9999",
city="Madeup Town",
country="CH"
)
# Create QR code data model
d = QRData(
iban="CH1234567890123456789",
creditor=p,
amount=5.0,
currency=Currency.chf,
message="Have a beer!"
)
# Create QR code object
q = SwissQR(d)
# Get QR code svg as a string
markup = q.get_markup()
# Save QR code to a file
p = pathlib.Path("/tmp/qr.svg")
q.save(p)
Installation
Install with pip
/git
:
pip install git+https://gitlab.com/dinuthehuman/swissqr.git
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swissqr-0.2.0.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file swissqr-0.2.0.tar.gz
.
File metadata
- Download URL: swissqr-0.2.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e94710a0e7b80128fc3b647897c6823bd6f03e287ad15858b6ad3f1453578747 |
|
MD5 | 338815ec8ad3ef7618fdad6044e05ddb |
|
BLAKE2b-256 | a063486e5032109aa5eeb1983499f1945eb94cbba7c86f64dd0bd9f2b0167b14 |
File details
Details for the file swissqr-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: swissqr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a95e595c12b2b95568324880d200fa3f3facfad7a4deae0d490cc33aca7d6312 |
|
MD5 | 51064cfadbfeb3b5b2cd9970f4d41df7 |
|
BLAKE2b-256 | 86ee4b3d3d886ba65e371cff949d44bcea51fbdb25eec69e5fa174437883bd3b |