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.

Installation

$ pip install -U saudi-id-validator

Basic Usage

To validate an ID:

from saudi_id_validator import validate

is_valid = validate('1071724369')  # could also be an integer
print(is_valid)
# 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 license. See LICENSE file.

Change Log

v1.0.6

  • Fixed the package homepage URL (Thanks to @ddimmich).

  • Updated CI tests to include recent python versions.

v1.0.5

  • Added params to docstrings.

  • Fixed a typo in README.

v1.0.4

  • Updated README.

v1.0.3

  • Updated usage example.

  • Updated README badges.

  • Removed LICENSE file extension.

v1.0.2

  • Improved README content.

v1.0.1

  • Fixed some typos in README file.

v1.0.0

  • 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

saudi-id-validator-1.0.6.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

saudi_id_validator-1.0.6-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page