Validira i ispisuje osnovne podatke o JMBGu. EN: Validates and displays basic UMCN data.
Project description
jmbg-validator
(README in English available below)
Program validira i ispisuje osnovne podatke o JMBGu.
Privatnost
Program ne čuva JMBG ni u kakvoj bazi niti ga šalje trećim stranama.
Instalacija
pip install jmbg-validator
Dolazi sa alatom za komandnu liniju (CLI) po imenu jmbg-validator
i Python modulom jmbg_validator
Upotreba
Matični broj 1234567890123
nije validan i koristi se samo kao primer.
U komandnoj liniji (CLI)
Alat za komandnu liniju se može koristiti na sledeći način:
$ jmbg-validator 1234567890123
Pol Validan Datum rođenja Region
Muški Da 11.12.1989. Vojvodina, Novi Sad
$ jmbg-validator 1234567890123 -o json
{"pol": "ženski", "datum_rodjenja": "06.09.1992.", "validan": true, "region": "Bosna i Hercegovina, Tuzla"}
Pregled svih dostupnih opcija:
usage: jmbg-validator [-h] [--output {table,text,json}] jmbg
Validira i ispisuje osnovne podatke o JMBGu
positional arguments:
jmbg 13 karaktera JMBGa
optional arguments:
-h, --help show this help message and exit
--output {table,text,json}, -o {table,text,json}
Kao Python modul
>>> from jmbg_validator import validate
>>> validate("1234567890123")
JMBG(pol='muški', datum_rodjenja='11.12.1989.', validan=True, region='Vojvodina, Novi Sad')
>>> print(validate("1234567890123"))
Pol: Muški, Validan: Da, Datum rođenja: 11.12.1989., Region: Vojvodina, Novi Sad
>>> validate("1234567890123")
>>> rezultat = JMBG(pol='muški', datum_rodjenja='11.12.1989.', validan=True, region='Vojvodina, Novi Sad')
>>> rezultat.validan
True
Za developere
$ python -m venv venv
$ source venv/bin/activate
$ pip install -e .
$ pip install -r dev_requirements.txt
Testiranje
$ python -m unittest discover
....................................................................
----------------------------------------------------------------------
Ran 68 tests in 0.001s
OK
Licenca
Mozilla Public License 2.0 ili ukratko
jmbg-validator
This program validates and displays basic UMCN data. UMCN was/still is in use in former Yugoslav republics as a way to uniquely identify citizens.
Privacy
This program does not store the UMCN and it does not share it with 3rd parties.
Installation
pip install jmbg-validator
Comes with a CLI tool jmbg-validator
and a Python module named jmbg_validator
Usage
UMCN 1234567890123
used below is not valid and is used for demonstration purposes only.
As a CLI tool
CLI tool can be used in this way:
$ jmbg-validator 1234567890123
Pol Validan Datum rođenja Region
Muški Da 11.12.1989. Vojvodina, Novi Sad
$ jmbg-validator 1234567890123 -o json
{"pol": "ženski", "datum_rodjenja": "06.09.1992.", "validan": true, "region": "Bosna i Hercegovina, Tuzla"}
Overview of available arguments:
usage: jmbg-validator [-h] [--output {table,text,json}] jmbg
Validira i ispisuje osnovne podatke o JMBGu
positional arguments:
jmbg 13 karaktera JMBGa
optional arguments:
-h, --help show this help message and exit
--output {table,text,json}, -o {table,text,json}
As a Python module
>>> from jmbg_validator import validate
>>> validate("1234567890123")
JMBG(pol='muški', datum_rodjenja='11.12.1989.', validan=True, region='Vojvodina, Novi Sad')
>>> print(validate("1234567890123"))
Pol: Muški, Validan: Da, Datum rođenja: 11.12.1989., Region: Vojvodina, Novi Sad
>>> validate("1234567890123")
>>> rezultat = JMBG(pol='muški', datum_rodjenja='11.12.1989.', validan=True, region='Vojvodina, Novi Sad')
>>> rezultat.validan
True
For developers
$ python -m venv venv
$ source venv/bin/activate
$ pip install -e .
$ pip install -r dev_requirements.txt
Running tests
$ python -m unittest discover
....................................................................
----------------------------------------------------------------------
Ran 68 tests in 0.001s
OK
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for JMBG_Validator-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efb119c940a229640a5084155fdb952e95ee6e4439a304638b12a7ab5cecc137 |
|
MD5 | cafb389b0bbcaced225b1470ba99376f |
|
BLAKE2b-256 | 50d7c8274a4e1c13a388384cd3cb210d84426d681c50374a9a5b06985556803d |