Skip to main content

A python library to parse Sri Lankan national identity card numbers

Project description


A python library to parse Sri Lankan national identity card numbers.


  • Supports both new and old NIC types.


git clone && cd nic_parser
python install


pip install nic-parser


>>> 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
>>> nic.check_digit
>>> nic.special_letter
>>> nic.id_type
<IdType.OLD: 0>


  • 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.

Files for nic-parser, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size nic_parser-0.2.0-py3-none-any.whl (15.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nic_parser-0.2.0.tar.gz (14.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page