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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nic_parser-0.2.0.tar.gz.
File metadata
- Download URL: nic_parser-0.2.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34b087f82396969c14582dcacb350014e83dd2552e8d3c8af765e0afc91b4801
|
|
| MD5 |
4b0d68fa1f9c00b80f8d61577ee9f5f0
|
|
| BLAKE2b-256 |
db7bc854d628c606897a1ec01dabb62b47ad0d4ab30e8558fc32f5562dbba656
|
File details
Details for the file nic_parser-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nic_parser-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b00a8fa120417ce14dd6ee202769fb9fdceae74d459743b279a3f297f5a3bde
|
|
| MD5 |
4150cb0177157476e255ec1e9f2dc84f
|
|
| BLAKE2b-256 |
2b31b28354aa20cb387da4a40b5771ee7eae87d66472bbe5179936a580c5b719
|