QR payment slip generator for Switzerland and Lichtenstein
Project description
Purpose
This library generates QR payment slips for Switzerland and Liechtenstein, which follow the Swiss Payment Standards 2019 (Version 2.1).
The library currently outputs the payment slips as SVG graphics.
Samples
Installation
$ pip install qr-payment-slip
Usage example
from qr_payment_slip.bill import QRPaymentSlip, Address
payment_slip = QRPaymentSlip()
# Set IBAN number (mandatory)
payment_slip.account = "CH9889144356966475815"
# Set address of creditor (mandatory)
payment_slip.creditor = Address(name="Hans Muster", address_line_1="Musterstrasse", address_line_2="1", pcode=1000, town="Musterhausen")
# Set amount (optional)
payment_slip.amount = 100
# Set address of debtor (optional)
payment_slip.debtor = Address(name="Marie de Brisay", address_line_1="Dreibündenstrasse 34", pcode=7260,
town="Davos Dorf")
# Generate and save qr payment slip
payment_slip.save_as("my_bill.svg")
Running tests
You can run tests either by executing:
$ python setup.py test
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
QR payment slip-0.1.1.tar.gz
(15.1 kB
view hashes)