解析斯里兰卡国民身份证号码的python库
nic_parser的Python项目详细描述
#nic_解析器
一个解析斯里兰卡国民身份证号码的python库。
##功能
- 支持新的和旧的NIC类型。
##安装
git clone https://github.com/chehanr/nic_parser.git && cd nic_parser python setup.py install
或
pip install nic-parser
##用法
>>> from nic_parser import NICParser >>> nic = NICParser('952903022V') >>> nic.birth_date datetime.datetime(1995, 10, 16, 0, 0) >>> nic.gender 'M' >>> nic.serial_number 302 >>> nic.check_digit 2 >>> nic.special_letter 'V' >>> nic.id_type 'Old' >>>
##待办事项
- 添加NIC号码生成。
- …