id numbers verification toolkits
Project description
idnumbers
National ID verification libs
This project in early phase. We might change the interface. Please wait our changelogs for more information.
Verify National IDs
All modules under nationalid package support the validate
function.
from idnumbers.nationalid import AUS, NGA, ZAF
# verify AUS tax file number (with checksum code)
AUS.TaxFileNumber.validate('32547689')
# verify AUS driver license number
AUS.DriverLicenseNumber.validate('12 345 678')
# verify AUS Medicare number (with checksum code)
AUS.MedicareNumber.validate('2123 45670 1')
# verify NGA national id number
NGA.NationalID.validate('12345678901')
# verify ZAF nation id number
ZAF.NationalID.validate('7605300675088')
Parse National IDs
Some modules whose METADATA.parsable == true
support the parse
function. It unpacks the detail data from the
national id.
from idnumbers.nationalid import ZAF
assert ZAF.NationalID.METADATA.parsable == True
# parse the national id
id_data = ZAF.NationalID.parse('7605300675088')
# access the date of birth, gender, and citizenship
print(id_data['yyyymmdd'])
print(id_data['gender'])
print(id_data['citizenship'])
Supported Country List:
- ARE - United Arab Emirates
- ARG - Argentina
- AUS - Australia
- BRA - Brazil
- CAN - Canada
- CHL - Chile
- CHN - China
- GBR - United Kingdom of Great Britain and Northern Ireland
- HKG - Hong Kong
- JPN - Japan
- KOR - South Korea
- IND - India
- IRL - Ireland
- LKA - Sri Lanka
- MYS - Malaysia
- NGA - Nigeria
- NZL - New Zealand
- PHL - Philippine
- SGP - Singapore
- THA - Thailand
- TWN - Taiwan
- UKR - Ukraine
- USA - United States
- VNM - Viet Nam
- ZAF - South Africa
- ZWE - Zimbabwe
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
idnumbers-0.1.0.tar.gz
(23.2 kB
view hashes)
Built Distribution
idnumbers-0.1.0-py3-none-any.whl
(47.2 kB
view hashes)
Close
Hashes for idnumbers-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ac1bee39a136ae159628f43874204e75da731b58dc98042bac8035228446591 |
|
MD5 | ae24f2a69deecde464ceaa9a4ebc2bd2 |
|
BLAKE2b-256 | 22411007270122f85b3f995f4149ee7463f6a0288650a9619f1b8a3986815d1e |