Validate ID numbers of Saudi Arabian identity cards
Project description
A Python package to validate ID numbers of Saudi Arabian identity cards for both citizens and residents.
The validation formula is based on Luhn algorithm which is in wide use today by many governments to distinguish valid numbers from mistyped or otherwise incorrect numbers.
Installation
$ pip install saudi-id-validator
Basic Usage
To validate an ID:
from saudi_id_validator import validate
v = validate(1071724369)
print(v)
# False
The validate method will return a boolean (True or False) indicating whether ID is valid or not.
License
This package is distributed under an MIT licence. See LICENSE file.
Change Log
1.0.3 (2019-05-22)
Updated usage example.
Updated README badges.
Removed LICENSE file extension.
1.0.2 (2018-11-18)
Improved README content.
1.0.1 (2018-12-06)
Fixed some typos in README file.
1.0.0 (2018-11-18)
First release.
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
Built Distribution
File details
Details for the file saudi-id-validator-1.0.3.tar.gz
.
File metadata
- Download URL: saudi-id-validator-1.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 940db9760f70f3c3786f38c5c7271b535a4e880e1f0a2c8289648f698b8d8083 |
|
MD5 | f22eb05abd6042c0663618ca19e19d44 |
|
BLAKE2b-256 | 104a2516f6819136ce60a9fd33f6648d1adc886e1efd043774e93c536b7dff5e |
File details
Details for the file saudi_id_validator-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: saudi_id_validator-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e58e1847fbe293917bd6342baffb731053b61507b79d408f35a81ab899d6a15b |
|
MD5 | e6ce962c978f49ec5609df10f0228896 |
|
BLAKE2b-256 | 637b294962dd504b22874819bf0d3ea872d82d1abfa3a39c091ca6003684f588 |