id numbers verification toolkits
Reason this release was yanked:
outdated release
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'])
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.0.0b1.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for idnumbers-0.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 661214d07764a48b1a1f5ae8de09197822bd0e609d8dc9c27929016af5cfae57 |
|
MD5 | 080fa3d0d9104e8206c7cadf1540406d |
|
BLAKE2b-256 | c99c8b8c48c9eef83afddbc3bea1e433ff0f21af167ccf26e9abd0a089179f26 |