egy-names (Python)
Egyptian names engine for Python 3.9+. Same book as the other SDKs — 44,626 lemmas, offline.
A legal Egyptian name is a patronymic chain, not a first name and a last name. This package generates, translates, splits, and corrects those chains.
afify.co/egy-names — origin, process, insights, lab, examples, and demo.
The Secret Code of Egyptian Names — how the engine was built.
Accuracy
The book comes from real records. Names outside the book go through the fallback model. Every guess is marked inferred. If it is not sure, it abstains. If you find a miss, open an issue.
Install
pip install egy-names==0.3.6
Use
from egy_names import EgyNames
e = EgyNames()
print(e.split("محمدأحمدعليحسنالشناوي"))
# ['محمد', 'أحمد', 'علي', 'حسن', 'الشناوي']
print(e.translate("محمد أحمد علي الشناوي"))
# Mohamed Ahmed Ali Elshenawy
print(e.correct("احمد مصطفا عبد الرحيم"))
# أحمد مصطفى عبدالرحيم
name = e.generate(gender="female", religion="muslim", length=4)[0]
print(name.ar, name.en)
print(e.is_valid("محمد")) # True
print(e.is_valid("الله")) # False — in the index, not a person's name
print(e.detect_gender("فاطمة محمد علي")) # first personal token wins
print(e.detect_religion("مينا جرجس بطرس"))
book = e.identify("محمد")
print(book.ar, book.inferred, book.source) # book path
for tok in e.identify_all("محمد زوكرمانوفيتش"):
print(tok.surface, tok.gender, tok.inferred, tok.source)
identify / identify_all are Python only. Book first. Then the fallback model. Check inferred.
Need the same names inside existing Faker tests? pip install faker-egy-names.
Full API: DOCUMENTATION.md. Runnable script: examples/python/.
Other languages
Same book, other SDKs — no samples here. See the repo and afify.co/egy-names.
License
MIT. Copyright (c) 2026 Afify by Abdullah Afify. An Afify open-source project.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file egy_names-0.3.6.tar.gz.
File metadata
- Download URL: egy_names-0.3.6.tar.gz
- Upload date:
- Size: 9.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc0a0416b4aa578f40e4a64d6de83fd0db0dfc6684808fe4c309f61c781a29a3
|
|
| MD5 |
1c5e30967663576f95513160420eb65d
|
|
| BLAKE2b-256 |
09967f5e57ea137bd0d8f3a495a265b7fa9307b9aae3fbb60c050b060c7d19c3
|
File details
Details for the file egy_names-0.3.6-py3-none-any.whl.
File metadata
- Download URL: egy_names-0.3.6-py3-none-any.whl
- Upload date:
- Size: 9.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
689af06ec27c628827d6a07ffa8d5d59c8962ee3833e32554c170d209e304e42
|
|
| MD5 |
5dcfcc8cf92cdd23a7b6d954950dd512
|
|
| BLAKE2b-256 |
d09e023e982c2b1fdc78b4cf94d4217addfb40a2f69e2f02698e57c6d2dfdbcf
|