Egyptian ID Validator (Python)
Egyptian ID Validator is a production-ready Python package for validating and parsing Egyptian national ID numbers.
It enforces the official structural rules defined by the Egyptian Ministry of Interior, including a verified but undisclosed checksum mechanism.
ℹ️ This package is part of a broader multi-language validation system.
For other implementations (e.g., Java, NPM), see the Egyptian-ID-Validator mother repository.
🔍 Features
- ✅ Format Validation – Ensures the ID is 14 digits and correctly structured.
- ✅ Checksum Validation – Verifies integrity using an official checksum method.
- ✅ Component Extraction – Parses the ID into:
- Year, Month, and Day of Birth
- Governorate Name and Code
- Gender (Male/Female)
📦 Installation
Install directly from PyPI:
pip install egyptian-id-validator
Supports Python >3.8.
🚀 Quick Usage
from egyptian_id_validator.validation 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.")
📁 Project Status
This package is stable and currently in production use. All validation logic adheres to official specifications.
🤝 Contributing
Contributions are welcome — especially for:
- Bug reports
- Feature suggestions
- Language porting alignment
Please use Issues and Pull Requests.
📄 License
This project is licensed under a custom MIT License with Limited Commercial Use Restrictions.
You are free to use, modify, and integrate the package — including in commercial projects — as long as:
- You provide proper attribution
- You do not sell, sublicense, or rely on this package as the core functionality or main value of a monetized product or service without prior permission
See the LICENSE.md file for full terms.
👤 Author
Mohamed A. Abdallah
Metadata
Release files for egyptian-id-validator 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| egyptian_id_validator-0.4.4.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| egyptian_id_validator-0.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / egyptian_id_validator-0.4.4.tar.gz
| Download URL | egyptian_id_validator-0.4.4.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
294685a455546f3158e0526ea352ed7a6ffeae27301b22ea2710e43c3e46cbfd
|
|
BLAKE2b-256 checksum How to use checksums |
050ed8eda432df269fb77c2c362870cfc32ed93d141c392a9daee6e420f04031
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / egyptian_id_validator-0.4.4-py3-none-any.whl
| Download URL | egyptian_id_validator-0.4.4-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d579c2abb2d6a9a3cca03b1971a9b43d0164f9e2739536713b5e5860488a05c0
|
|
BLAKE2b-256 checksum How to use checksums |
7a201ff13ee3aef2e07ac0dd3dfc36ac3a3e6509f14a5507301c5cfed5ecbf86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|