A python library to parse Sri Lankan national identity card numbers
Project description
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.- ...
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
nic_parser-0.2.0.tar.gz
(14.8 kB
view hashes)
Built Distribution
nic_parser-0.2.0-py3-none-any.whl
(15.3 kB
view hashes)
Close
Hashes for nic_parser-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b00a8fa120417ce14dd6ee202769fb9fdceae74d459743b279a3f297f5a3bde |
|
MD5 | 4150cb0177157476e255ec1e9f2dc84f |
|
BLAKE2b-256 | 2b31b28354aa20cb387da4a40b5771ee7eae87d66472bbe5179936a580c5b719 |