Skip to main content

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.

Build Status Coverage Status Supported versions PyPI Package version License

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.


$ pip install -U saudi-id-validator

Basic Usage

To validate an ID:

from saudi_id_validator import validate

v = validate(1071724369)
# False

The validate method will return a boolean (True or False) indicating whether ID is valid or not.


This package is distributed under an MIT license. See LICENSE file.

Change Log


  • Added params to docstrings
  • Fixed a typo in README.


  • Updated README.


  • Updated usage example.
  • Updated README badges.
  • Removed LICENSE file extension.


  • Improved README content.


  • Fixed some typos in README file.


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

Files for saudi-id-validator, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size saudi_id_validator-1.0.5-py3-none-any.whl (3.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size saudi-id-validator-1.0.5.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page