Skip to main content

upnqr

README is also available in English

Python knjižnica za generiranje QR kod za Univerzalni Plačilni Nalog (UPN).

Specifikacija

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)

Source distribution for upnqr 0.1.0
File Size Uploaded
upnqr-0.1.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for upnqr 0.1.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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