A Python package for validating Egyptian National IDs.
Project description
Egyptian ID Validator
Egyptian ID Validator is a Python package for validating Egyptian national ID numbers. It ensures that the provided ID meets the required format and checks its validity based on the structure of Egyptian IDs.
Features
- Format Validation: Checks if the ID is in the correct 14-digit format.
- Checksum Validation: Verifies the ID using a checksum algorithm.
- Component Extraction: Extracts and returns detailed components from the ID, including year, month, day, governorate, and gender.
Installation
To install the package, you can use pip:
pip install egyptian-id-validator
Usage
You can use the package directly in your Python code. Here’s an example of how to use the validate_egyptian_id
function:
from egyptian_id_validator import validate_egyptian_id
id_number = "20001012345678" # Replace with the ID you want to validate
result = validate_egyptian_id(id_number)
if result:
print("Valid ID:")
for key, value in result.items():
print(f"{key}: {value}")
else:
print("Invalid ID.")
Development Status
The project is currently in the Alpha stage. Features and functionality may be incomplete, and APIs may change.
License
This package is licensed under the CC BY-NC 4.0 License. See the LICENSE file for more details.
Contributing
Contributions are welcome! If you have suggestions, bug reports, or feature requests, please submit them via GitHub issues or pull requests.
Author
- Mohamed A. Abdallah - GitHub - eng.mohamed.a.abdallah@gmail.com
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
Built Distribution
File details
Details for the file egyptian_id_validator-0.1.0.tar.gz
.
File metadata
- Download URL: egyptian_id_validator-0.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19b5dd654a8e15baf27c1e4b2981080c9d9752ba237fe985c1df49e868cf85bf |
|
MD5 | 8f4ac3381d422f578eb67b822882a1ee |
|
BLAKE2b-256 | ae41db97eb612039279f2e6a99e0f876b6348b5ec145650b374dda84154477b5 |
File details
Details for the file egyptian_id_validator-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: egyptian_id_validator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f93c2ed3b6947ada2a4596c3b739a44f230ddc5306d4a6aaaf72fbbe3f9cd86d |
|
MD5 | 2bdb4d46ce5799bc9a54fb99424081e9 |
|
BLAKE2b-256 | 7838f04b5de7a333d0773aa91215e0b4274d4d40a176af47c85efb5e0b037ce5 |