Skip to main content

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

Metadata

Release files for swissqr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swissqr 0.2.0
File Size Uploaded Provenance Actions
swissqr-0.2.0.tar.gz 6.4 kB Without provenance Details for swissqr-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swissqr 0.2.0
File Interpreter ABI Platform Actions
swissqr-0.2.0-py3-none-any.whl Python 3 none any Details for swissqr-0.2.0-py3-none-any.whl

Total release size: 12.8 kB

Release files / swissqr-0.2.0.tar.gz

Download URL swissqr-0.2.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e94710a0e7b80128fc3b647897c6823bd6f03e287ad15858b6ad3f1453578747
BLAKE2b-256 checksum
How to use checksums
a063486e5032109aa5eeb1983499f1945eb94cbba7c86f64dd0bd9f2b0167b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / swissqr-0.2.0-py3-none-any.whl

Download URL swissqr-0.2.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a95e595c12b2b95568324880d200fa3f3facfad7a4deae0d490cc33aca7d6312
BLAKE2b-256 checksum
How to use checksums
86ee4b3d3d886ba65e371cff949d44bcea51fbdb25eec69e5fa174437883bd3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for swissqr 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page