Metadata-Version: 2.1
Name: swissqr
Version: 0.2.0
Summary: Generator for SwissQR invoice qr codes
Home-page: https://gitlab.com/dinuthehuman/swissqr
Author: Martin Obrist
Author-email: dev@obrist.email
License: MIT
Project-URL: Source Code, https://gitlab.com/dinuthehuman/swissqr
Project-URL: Issue Tracker, https://gitlab.com/dinuthehuman/swissqr/-/issues
Keywords: Switzerland,payment,qrcode
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Office/Business :: Financial
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9, <4
Description-Content-Type: text/markdown
Requires-Dist: beautifulsoup4
Requires-Dist: iso4217
Requires-Dist: lxml
Requires-Dist: pyban
Requires-Dist: pyban-swift
Requires-Dist: pycountry
Requires-Dist: pydantic
Requires-Dist: qrcode
Provides-Extra: dev
Requires-Dist: invoke ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'

# swissqr

Python lib to generate the QR code of Swiss QR bills. Check [here](https://www.six-group.com/en/products-services/banking-services/billing-and-payments/qr-bill.html) for more details on QR bills.

**Beware:** This library is not well tested, use at your own risk!

## Quickstart:

```python
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`:

```bash
pip install git+https://gitlab.com/dinuthehuman/swissqr.git
```
