Skip to main content

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 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'
>>>

## TODO

  • Add NIC number generation.

Project details


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.1.0.tar.gz (26.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page