upnqr
README is also available in English
Python knjižnica za generiranje QR kod za Univerzalni Plačilni Nalog (UPN).
Specifikacija
- Standard in pomožna dokumentacija (zip)
- Seznam kod namenov (zip)
- Pravila za uporabo referenc SI (pdf)
- Združenje Bank Slovenije - Standardi in priročniki (splet)
Namestitev
pip install git+https://github.com/franga2000/upnqr.git#egg=upnqr
Uporaba
Priprava podatkov:
import upnqr
data = upnqr.Data(
placnik = upnqr.Placnik(
ime='Ime Plačnika',
ulica='Plačnikova ulica 1',
kraj='Kraj Plačnika'),
prejemnik = upnqr.Prejemnik(
ime='Ime Prejemnika',
ulica='Prejemnikova ulica 1',
kraj='Kraj Prejemnika',
iban='SI56043020002997963'),
znesek = 42.00,
koda_namena = 'COST',
namen_placila = 'Namen plačila',
rok_placila = '2022-05-01',
referenca = 'SI1212345678909'
)
qr = upnqr.make_from_data(data)
Izpis v različnih oblikah:
# V rastrski obliki (slika)
img = upnqr.to_pil(qr)
img.save('out.png')
# V vektorski obliki (SVG)
svg = upnqr.to_svg(qr)
with open('out.svg', 'w') as f:
f.write(svg)
# V vektorski obliki (SVG path - za vstavljanje v obstoječ SVG)
path_spec = upnqr.to_svg_path(qr)
path_el = f'<path d="{path_spec}" fill="#000000"/>'
# V besedilni obliki (npr. za izpis v terminalu, uporablja Unicode simbole za bela polja)
txt = to_text(qr)
print(txt)
Metadata
Release files for upnqr 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| upnqr-0.1.0.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| upnqr-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.0 kB
Release files / upnqr-0.1.0.tar.gz
| Download URL | upnqr-0.1.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e699bc64f1373c6128952a748781071b0d7cba44ef264d7f9b6c6adc77fea26
|
|
BLAKE2b-256 checksum How to use checksums |
6e7ae667530369c0816076612991042c5cd856932ffd06c8a715bff527201c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.
Transparency logRelease files / upnqr-0.1.0-py3-none-any.whl
| Download URL | upnqr-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9195455178c8d72585e1bacc5bc5fafb4c76c43568c91e0cf119f69cb7428b48
|
|
BLAKE2b-256 checksum How to use checksums |
8f7a9a9bf89f8995490bccc41c703dd5a928bc898fcb6ca8db84fa50b5723d2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 8, 2025.
Transparency log