nic_parser
A python library to parse Sri Lankan national identity card numbers.
Features
- Supports both new and old NIC types.
Installation
git clone https://github.com/chehanr/nic_parser.git && cd nic_parser
python setup.py install
Or
pip install nic-parser
Usage
>>> from nic_parser.parser import Parser
>>> nic = Parser('952903022V')
>>> nic.birth_date
datetime.datetime(1995, 10, 16, 0, 0)
>>> nic.gender
<Gender.MALE: 0>
>>> nic.serial_number
302
>>> nic.check_digit
2
>>> nic.special_letter
'V'
>>> nic.id_type
<IdType.OLD: 0>
>>>
TODO
Add NIC number generation.- ...
Metadata
Release files for nic-parser 0.2.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 | |
|---|---|---|---|
| nic_parser-0.2.0.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nic_parser-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.1 kB
Release files / nic_parser-0.2.0.tar.gz
| Download URL | nic_parser-0.2.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34b087f82396969c14582dcacb350014e83dd2552e8d3c8af765e0afc91b4801
|
|
BLAKE2b-256 checksum How to use checksums |
db7bc854d628c606897a1ec01dabb62b47ad0d4ab30e8558fc32f5562dbba656
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
|
Release files / nic_parser-0.2.0-py3-none-any.whl
| Download URL | nic_parser-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b00a8fa120417ce14dd6ee202769fb9fdceae74d459743b279a3f297f5a3bde
|
|
BLAKE2b-256 checksum How to use checksums |
2b31b28354aa20cb387da4a40b5771ee7eae87d66472bbe5179936a580c5b719
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5
|