Skip to main content

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.

Metadata

Release files for egy-names 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for egy-names 0.3.6
File Size Uploaded
egy_names-0.3.6.tar.gz 9.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for egy-names 0.3.6
File Interpreter ABI Platform
egy_names-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 MB

Release files / egy_names-0.3.6.tar.gz

Download URL egy_names-0.3.6.tar.gz
Size 9.2 MB
Tags Source
SHA-256 checksum
How to use checksums
cc0a0416b4aa578f40e4a64d6de83fd0db0dfc6684808fe4c309f61c781a29a3
BLAKE2b-256 checksum
How to use checksums
09967f5e57ea137bd0d8f3a495a265b7fa9307b9aae3fbb60c050b060c7d19c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / egy_names-0.3.6-py3-none-any.whl

Download URL egy_names-0.3.6-py3-none-any.whl
Size 9.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
689af06ec27c628827d6a07ffa8d5d59c8962ee3833e32554c170d209e304e42
BLAKE2b-256 checksum
How to use checksums
d09e023e982c2b1fdc78b4cf94d4217addfb40a2f69e2f02698e57c6d2dfdbcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page