A previous release had provenance metadata, but this release does not. View details.
Egydata
🚀 Project Identity & Versioning
| Badge Type | Markdown Code |
|---|---|
| PyPI Version | |
| GitHub Release | |
| GitHub Tag | |
| License | |
| PyPI Status |
📊 Stats & Downloads
| Badge Type | Markdown Code |
|---|---|
| Total Downloads (Pepy) | |
| Monthly Downloads (Pepy) | |
| Weekly Downloads (Pepy) | |
| PyPI Downloads (Daily) | |
| PyPI Downloads (Weekly) | |
| PyPI Downloads (Monthly) |
🛠️ Activity & Development
| Badge Type | Markdown Code |
|---|---|
| Last Commit | |
| Commit Activity (Yearly) | |
| Contributors | |
| Repo Size | |
| Code Size | |
| Top Language | |
| Language Count |
✨ Quality & Testing
| Badge Type | Markdown Code |
|---|---|
| Build Status | |
| Coverage | |
| Code Quality | |
| Typing | |
| PyPI Types |
🐍 Environment & Compatibility
| Badge Type | Markdown Code |
|---|---|
| Python Versions | |
| PyPI Implementation | |
| PyPI Wheel | |
| PyPI Format |
🤝 Community & Social
| Badge Type | Markdown Code |
|---|---|
| GitHub Stars | |
| GitHub Forks | |
| GitHub Watchers | |
| GitHub Followers | |
| GitHub Discussions |
🛠️ Support & Maintenance
| Badge Type | Markdown Code |
|---|---|
| Open Issues | |
| Closed Issues | |
| Open PRs | |
| Closed PRs | |
| Milestones |
Structured Egyptian geographical and timezone data for Python.
Provides a complete, offline dataset of Egyptian governorates, cities, landline and mobile area codes, and timezone utilities — with zero dependencies (uses Python standard library only).
Installation
pip install egydata
Quick Start
from egydata import governorates, cities, phoneAreas, timezones
# Get all governorates
all_govs = governorates.get_all()
# Find a city by name
maadi = cities.search("Maadi")
# Check current time in Egypt
now = timezones.now()
Usage
Governorates
from egydata import governorates
# Get all 27 governorates
all_govs = governorates.get_all()
# [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}, ...]
# Find by code
cairo = governorates.get_by_code("CAI")
# {'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}
# Find by id
alex = governorates.get_by_id(2)
# {'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}
# Search (Arabic, English, or code, partial match)
results = governorates.search("alex")
# [{'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}]
ar_results = governorates.search("القاهرة")
# [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}]
Cities
from egydata import cities
# Get cities by governorate code
cairo_cities = cities.get_by_governorate("CAI")
# [{'id': 1, 'name': 'مدينة نصر', 'nameEn': 'Nasr City', 'governorateCode': 'CAI'}, ...]
# Find by id
sharm = cities.get_by_id(131)
# {'id': 131, 'name': 'شرم الشيخ', 'nameEn': 'Sharm El Sheikh', 'governorateCode': 'SIS'}
# Search cities (Arabic or English, partial match)
found = cities.search("Maadi")
# [{'id': 3, 'name': 'المعادي', 'nameEn': 'Maadi', 'governorateCode': 'CAI'}]
Phone Area Codes
from egydata import phoneAreas
# Get all area codes (landline and mobile)
all_codes = phoneAreas.get_all()
# [{'code': '010', 'region': 'ڤودافون', 'regionEn': 'Vodafone'}, ...]
# Look up region by code
region = phoneAreas.get_region("03")
# {'code': '03', 'region': 'الإسكندرية', 'regionEn': 'Alexandria'}
# Find area code by region name (Arabic or English)
entry = phoneAreas.get_code("Mansoura")
# {'code': '050', 'region': 'الدقهلية (المنصورة)', 'regionEn': 'Dakahlia (Mansoura)'}
Timezone
from egydata import timezones
print(timezones.name) # 'Africa/Cairo'
print(timezones.offset) # '+02:00' (standard time offset)
now = timezones.now() # current date/time in Egypt (timezone-aware datetime)
print(now.isoformat())
# Check if daylight saving time is active (Egypt resumed DST in 2023)
is_dst = timezones.isDST() # returns True if current offset is +03:00
# Optionally check a specific date
from datetime import datetime
date = datetime(2024, 8, 1)
print(timezones.isDST(date)) # True (during DST period)
API Reference
governorates
| Method | Parameters | Returns | Description |
|---|---|---|---|
| get_all() | – | list<Governorate> | Returns all 27 Egyptian governorates. |
| get_by_code(code) | code: str | Governorate | None | Find governorate by its code (e.g., 'CAI'). |
| get_by_id(id) | id: int/str | Governorate | None | Find governorate by its numeric ID. |
| search(query) | query: str | list<Governorate> | Search by Arabic/English name or code (case‑insensitive, partial). |
Governorate shape: {'id': int, 'code': str, 'name': str, 'nameEn': str}
cities
| Method | Parameters | Returns | Description |
|---|---|---|---|
| get_by_governorate(gov_code) | gov_code: str | list<City> | Get all cities in a governorate (by its code). |
| get_by_id(id) | id: int/str | City | None | Find city by its numeric ID. |
| search(query) | query: str | list<City> | Search by Arabic or English name (partial, case‑insensitive). |
City shape: {'id': int, 'name': str, 'nameEn': str, 'governorateCode': str}
phoneArea
| Method | Parameters | Returns | Description |
|---|---|---|---|
| get_all() | – | list<AreaCode> | Returns all landline and mobile area codes. |
| get_region(code) | code: str | AreaCode | None | Look up region info by area code. |
| get_code(region_name) | region_name: str | AreaCode | None | Find area code entry by region name (Arabic or English). |
AreaCode shape: {'code': str, 'region': str, 'regionEn': str}
timezone
| Property / Method | Returns | Description |
|---|---|---|
| name | 'Africa/Cairo' | IANA timezone identifier. |
| offset | '+02:00' | Standard UTC offset (without DST). |
| now() | datetime | Current date and time in Egypt (timezone‑aware). |
| isDST(date=None) | bool | Whether DST is active (for given date or now). |
Data Coverage
· 27 governorates with Arabic and English names and ISO‑like codes. · 151 cities and districts across all governorates. · 30 landline and mobile area codes (including mobile operators). · Full timezone support for Africa/Cairo (DST‑aware).
All data is embedded in the package – no network requests, no external dependencies.
Requirements
· Python 3.9 or later (uses standard library zoneinfo; for Python 3.8 you may need the backports.zoneinfo package).
License
MIT - InnoSoft Company
Metadata
Release files for egydata 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| egydata-1.1.0.tar.gz | 15.2 kB | Without provenance | Details for egydata-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| egydata-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for egydata-1.1.0-py3-none-any.whl |
Total release size: 28.3 kB
Release files / egydata-1.1.0.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | egydata-1.1.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9df734d6ad102e59725330b6693d906e541b284b74dae152ea76809e4bc10666
|
|
BLAKE2b-256 checksum How to use checksums |
b70286fa360171e92b5255a33603e434a1fa44784d2130cf5cdd74a49d2ac6c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / egydata-1.1.0-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | egydata-1.1.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
492ee5b4352220742b611570cb87b5b7be00e1cbb503507208393376b2cac17c
|
|
BLAKE2b-256 checksum How to use checksums |
d733fbee51e15ec46f353caaa262598f2331e5a7783be91619613df953d9e800
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for egydata 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 1.0.0 2 files With provenance
- Added 1.1.0 2 files Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.