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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

egy_names-0.3.6.tar.gz (9.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

egy_names-0.3.6-py3-none-any.whl (9.2 MB view details)

Uploaded Python 3

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

Hashes for egy_names-0.3.6.tar.gz
Algorithm Hash digest
SHA256 cc0a0416b4aa578f40e4a64d6de83fd0db0dfc6684808fe4c309f61c781a29a3
MD5 1c5e30967663576f95513160420eb65d
BLAKE2b-256 09967f5e57ea137bd0d8f3a495a265b7fa9307b9aae3fbb60c050b060c7d19c3

See more details on using hashes here.

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

Hashes for egy_names-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 689af06ec27c628827d6a07ffa8d5d59c8962ee3833e32554c170d209e304e42
MD5 5dcfcc8cf92cdd23a7b6d954950dd512
BLAKE2b-256 d09e023e982c2b1fdc78b4cf94d4217addfb40a2f69e2f02698e57c6d2dfdbcf

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 files

0.3.5

2 files

0.3.4

2 files

0.3.2

2 files

0.3.1

2 files

0.2.1

2 files

0.1.1

2 files

0.1.0

2 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