Skip to main content

A small package which will generate a QR UPN.

Project description

QR UPN package

This is a small package that will generate a QR UPN. The package also checks the field length for each field and the validity of the field format. This ensures that the generated QR code will be valid. QR code validation checks were done using this software.

Feel free to address any issues or improvements.


Installation

pip install qr-upn==1.2.0

Functions:

All the following functions can be accessed using:

from qr_upn.utils import *

gen_qr_upn

This function create a UPN document with a valid QR code. The parameters the function requires are the following:

  • p_name: Payer name
  • p_address: Payer address
  • p_post: Payer postal address and postal number
  • price: Price the payer has to pay
  • date: Date when the document is valid (DD.MM.YYYY)
  • purpose_code: Purpose code which has to be valid (list of codes: LINK)
  • purpose: Purpose of the payment
  • pay_date: Date until the bill has to be paid (DD.MM.YYYY)
  • r_iban: Receiver IBAN
  • r_reference: Receiver reference (validated as mentioned: LINK)
  • r_name: Receiver name
  • r_address: Receiver address
  • r_post: Receiver postal address and postal number

Optional parameters:

  • save_to: Path where the QR UPN document will be saved to
  • save_qr: Path where the QR code will be saved to
  • show: Visualize the generated QR UPN document
    data = {
        'p_name': 'JANEZ NOVAK',
        'p_address': 'Dunajska ulica 1',
        'p_post': '1000 Ljubljana',
        'price': '100',
        'date': '25.04.2019',
        'purpose_code': 'SWSB',
        'purpose': 'Plačilo najemnine za marec 2019',
        'pay_date': '30.04.2019',
        'r_iban': 'SI56037210001000102',
        'r_ref': 'SI06 125412-135-1257',
        'r_name': 'RentaCar d.o.o.',
        'r_address': 'Pohorska ulica 22',
        'r_post': '2000 Maribor',
        'save_to': './test.png',
        'save_qr': './test_qr.png',
        'show': True
    }
    gen_qr_upn(**data)

validate_reference

Functions that checks if the provided reference code is valid. It supports the SI and RF model. The function accepts a single parameter:

    validate_reference('SI02 5124123-62146-63720')

SI_model_check

Function that handles the SI reference model validation.

    SI_model_check('SI02 5124123-62146-63720')

RF_model_check

Function that handles the RF reference model validation.

    RF_model_check('SI02 5124123-62146-63720')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qr_upn-1.2.0.tar.gz (32.7 MB view details)

Uploaded Source

Built Distribution

qr_upn-1.2.0-py3-none-any.whl (507.4 kB view details)

Uploaded Python 3

File details

Details for the file qr_upn-1.2.0.tar.gz.

File metadata

  • Download URL: qr_upn-1.2.0.tar.gz
  • Upload date:
  • Size: 32.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for qr_upn-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2a2f51e633e7ecb6db8faf01c8bde7cde77314a86f7ef1db8d6579706e96362b
MD5 bca571cecd44a3dcc10896887df1a94b
BLAKE2b-256 47fe5c3277d48077277eaf8caf956a90f8a48e9461eb3f3571e4c515a8391de0

See more details on using hashes here.

File details

Details for the file qr_upn-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: qr_upn-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 507.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for qr_upn-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8904df9a4d92044b64773a7316a578d67797b6427be9cce80ea02d13d040eab0
MD5 e1e65e0d51e5cc1ad7f485b1bccd1c76
BLAKE2b-256 415e6e4134c4c668a0c18c295d849f9da8ff6d94c8a069d863a8ca35f76d96ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page