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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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