egydata 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
egydata-1.0.0/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 InnoSoft
4
+ CEO & Founder: Mohamed Ahmed Ghanam
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
egydata-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,234 @@
1
+ Metadata-Version: 2.4
2
+ Name: egydata
3
+ Version: 1.0.0
4
+ Summary: Python library created by InnoSoft-Company tech team for Egyptian data: cities, governorates, timezones, phone numbers, etc.
5
+ Home-page: https://www.midoghanam.site/
6
+ Author: InnoSoft Company
7
+ Author-email: InnoSoft Company <midoghanam@hotmail.com>, Mohammed Ahmed Ghanam <midoghanam@hotmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026 InnoSoft
11
+ CEO & Founder: Mohamed Ahmed Ghanam
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ Keywords: egypt,data,cities,governorates,timezone,phone numbers
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Requires-Python: >=3.9
35
+ Description-Content-Type: text/markdown
36
+ License-File: LICENSE
37
+ Dynamic: author
38
+ Dynamic: home-page
39
+ Dynamic: license-file
40
+ Dynamic: requires-python
41
+
42
+ # Egydata
43
+
44
+ [![PyPI Version](https://img.shields.io/pypi/v/egydata.svg)](https://pypi.org/project/egydata/)
45
+ [![Python Versions](https://img.shields.io/pypi/pyversions/egydata.svg)](https://pypi.org/project/egydata/)
46
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/InnoSoft-Company/egydata/blob/main/LICENSE)
47
+
48
+ Structured Egyptian geographical and timezone data for Python.
49
+
50
+ 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).
51
+
52
+ [View on GitHub](https://github.com/InnoSoft-Company/egydata) | [View on PyPI](https://pypi.org/project/egydata/)
53
+
54
+ ---
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ pip install egydata
60
+ ```
61
+
62
+ Quick Start
63
+
64
+ ```python
65
+ from egydata import governorates, cities, phoneArea, timezone
66
+
67
+ # Get all governorates
68
+ all_govs = governorates.get_all()
69
+
70
+ # Find a city by name
71
+ maadi = cities.search("Maadi")
72
+
73
+ # Check current time in Egypt
74
+ now = timezone.now()
75
+ ```
76
+
77
+ ---
78
+
79
+ Usage
80
+
81
+ Governorates
82
+
83
+ ```python
84
+ from egydata import governorates
85
+
86
+ # Get all 27 governorates
87
+ all_govs = governorates.get_all()
88
+ # [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}, ...]
89
+
90
+ # Find by code
91
+ cairo = governorates.get_by_code("CAI")
92
+ # {'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}
93
+
94
+ # Find by id
95
+ alex = governorates.get_by_id(2)
96
+ # {'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}
97
+
98
+ # Search (Arabic, English, or code, partial match)
99
+ results = governorates.search("alex")
100
+ # [{'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}]
101
+
102
+ ar_results = governorates.search("القاهرة")
103
+ # [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}]
104
+ ```
105
+
106
+ Cities
107
+
108
+ ```python
109
+ from egydata import cities
110
+
111
+ # Get cities by governorate code
112
+ cairo_cities = cities.get_by_governorate("CAI")
113
+ # [{'id': 1, 'name': 'مدينة نصر', 'nameEn': 'Nasr City', 'governorateCode': 'CAI'}, ...]
114
+
115
+ # Find by id
116
+ sharm = cities.get_by_id(131)
117
+ # {'id': 131, 'name': 'شرم الشيخ', 'nameEn': 'Sharm El Sheikh', 'governorateCode': 'SIS'}
118
+
119
+ # Search cities (Arabic or English, partial match)
120
+ found = cities.search("Maadi")
121
+ # [{'id': 3, 'name': 'المعادي', 'nameEn': 'Maadi', 'governorateCode': 'CAI'}]
122
+ ```
123
+
124
+ Phone Area Codes
125
+
126
+ ```python
127
+ from egydata import phoneArea
128
+
129
+ # Get all area codes (landline and mobile)
130
+ all_codes = phoneArea.get_all()
131
+ # [{'code': '010', 'region': 'ڤودافون', 'regionEn': 'Vodafone'}, ...]
132
+
133
+ # Look up region by code
134
+ region = phoneArea.get_region("03")
135
+ # {'code': '03', 'region': 'الإسكندرية', 'regionEn': 'Alexandria'}
136
+
137
+ # Find area code by region name (Arabic or English)
138
+ entry = phoneArea.get_code("Mansoura")
139
+ # {'code': '050', 'region': 'الدقهلية (المنصورة)', 'regionEn': 'Dakahlia (Mansoura)'}
140
+ ```
141
+
142
+ Timezone
143
+
144
+ ```python
145
+ from egydata import timezone
146
+
147
+ print(timezone.name) # 'Africa/Cairo'
148
+ print(timezone.offset) # '+02:00' (standard time offset)
149
+
150
+ now = timezone.now() # current date/time in Egypt (timezone-aware datetime)
151
+ print(now.isoformat())
152
+
153
+ # Check if daylight saving time is active (Egypt resumed DST in 2023)
154
+ is_dst = timezone.isDST() # returns True if current offset is +03:00
155
+
156
+ # Optionally check a specific date
157
+ from datetime import datetime
158
+ date = datetime(2024, 8, 1)
159
+ print(timezone.isDST(date)) # True (during DST period)
160
+ ```
161
+
162
+ ---
163
+
164
+ API Reference
165
+
166
+ governorates
167
+
168
+ Method Parameters Returns Description
169
+ get_all() – list[Governorate] Returns all 27 Egyptian governorates.
170
+ get_by_code(code) code: str Governorate \| None Find governorate by its code (e.g., 'CAI').
171
+ get_by_id(id) id: int/str Governorate \| None Find governorate by its numeric ID.
172
+ search(query) query: str list[Governorate] Search by Arabic/English name or code (case‑insensitive, partial).
173
+
174
+ Governorate shape:
175
+ {'id': int, 'code': str, 'name': str, 'nameEn': str}
176
+
177
+ ---
178
+
179
+ cities
180
+
181
+ Method Parameters Returns Description
182
+ get_by_governorate(gov_code) gov_code: str list[City] Get all cities in a governorate (by its code).
183
+ get_by_id(id) id: int/str City \| None Find city by its numeric ID.
184
+ search(query) query: str list[City] Search by Arabic or English name (partial, case‑insensitive).
185
+
186
+ City shape:
187
+ {'id': int, 'name': str, 'nameEn': str, 'governorateCode': str}
188
+
189
+ ---
190
+
191
+ phoneArea
192
+
193
+ Method Parameters Returns Description
194
+ get_all() – list[AreaCode] Returns all landline and mobile area codes.
195
+ get_region(code) code: str AreaCode \| None Look up region info by area code.
196
+ get_code(region_name) region_name: str AreaCode \| None Find area code entry by region name (Arabic or English).
197
+
198
+ AreaCode shape:
199
+ {'code': str, 'region': str, 'regionEn': str}
200
+
201
+ ---
202
+
203
+ timezone
204
+
205
+ Property / Method Returns Description
206
+ name 'Africa/Cairo' IANA timezone identifier.
207
+ offset '+02:00' Standard UTC offset (without DST).
208
+ now() datetime Current date and time in Egypt (timezone‑aware).
209
+ isDST(date=None) bool Whether DST is active (for given date or now).
210
+
211
+ ---
212
+
213
+ Data Coverage
214
+
215
+ · 27 governorates with Arabic and English names and ISO‑like codes.
216
+ · 151 cities and districts across all governorates.
217
+ · 30 landline and mobile area codes (including mobile operators).
218
+ · Full timezone support for Africa/Cairo (DST‑aware).
219
+
220
+ All data is embedded in the package – no network requests, no external dependencies.
221
+
222
+ ---
223
+
224
+ Requirements
225
+
226
+ · Python 3.9 or later (uses standard library zoneinfo; for Python 3.8 you may need the backports.zoneinfo package).
227
+
228
+ ---
229
+
230
+ License
231
+
232
+ MIT
233
+
234
+ ```
@@ -0,0 +1,193 @@
1
+ # Egydata
2
+
3
+ [![PyPI Version](https://img.shields.io/pypi/v/egydata.svg)](https://pypi.org/project/egydata/)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/egydata.svg)](https://pypi.org/project/egydata/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/InnoSoft-Company/egydata/blob/main/LICENSE)
6
+
7
+ Structured Egyptian geographical and timezone data for Python.
8
+
9
+ 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).
10
+
11
+ [View on GitHub](https://github.com/InnoSoft-Company/egydata) | [View on PyPI](https://pypi.org/project/egydata/)
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install egydata
19
+ ```
20
+
21
+ Quick Start
22
+
23
+ ```python
24
+ from egydata import governorates, cities, phoneArea, timezone
25
+
26
+ # Get all governorates
27
+ all_govs = governorates.get_all()
28
+
29
+ # Find a city by name
30
+ maadi = cities.search("Maadi")
31
+
32
+ # Check current time in Egypt
33
+ now = timezone.now()
34
+ ```
35
+
36
+ ---
37
+
38
+ Usage
39
+
40
+ Governorates
41
+
42
+ ```python
43
+ from egydata import governorates
44
+
45
+ # Get all 27 governorates
46
+ all_govs = governorates.get_all()
47
+ # [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}, ...]
48
+
49
+ # Find by code
50
+ cairo = governorates.get_by_code("CAI")
51
+ # {'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}
52
+
53
+ # Find by id
54
+ alex = governorates.get_by_id(2)
55
+ # {'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}
56
+
57
+ # Search (Arabic, English, or code, partial match)
58
+ results = governorates.search("alex")
59
+ # [{'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}]
60
+
61
+ ar_results = governorates.search("القاهرة")
62
+ # [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}]
63
+ ```
64
+
65
+ Cities
66
+
67
+ ```python
68
+ from egydata import cities
69
+
70
+ # Get cities by governorate code
71
+ cairo_cities = cities.get_by_governorate("CAI")
72
+ # [{'id': 1, 'name': 'مدينة نصر', 'nameEn': 'Nasr City', 'governorateCode': 'CAI'}, ...]
73
+
74
+ # Find by id
75
+ sharm = cities.get_by_id(131)
76
+ # {'id': 131, 'name': 'شرم الشيخ', 'nameEn': 'Sharm El Sheikh', 'governorateCode': 'SIS'}
77
+
78
+ # Search cities (Arabic or English, partial match)
79
+ found = cities.search("Maadi")
80
+ # [{'id': 3, 'name': 'المعادي', 'nameEn': 'Maadi', 'governorateCode': 'CAI'}]
81
+ ```
82
+
83
+ Phone Area Codes
84
+
85
+ ```python
86
+ from egydata import phoneArea
87
+
88
+ # Get all area codes (landline and mobile)
89
+ all_codes = phoneArea.get_all()
90
+ # [{'code': '010', 'region': 'ڤودافون', 'regionEn': 'Vodafone'}, ...]
91
+
92
+ # Look up region by code
93
+ region = phoneArea.get_region("03")
94
+ # {'code': '03', 'region': 'الإسكندرية', 'regionEn': 'Alexandria'}
95
+
96
+ # Find area code by region name (Arabic or English)
97
+ entry = phoneArea.get_code("Mansoura")
98
+ # {'code': '050', 'region': 'الدقهلية (المنصورة)', 'regionEn': 'Dakahlia (Mansoura)'}
99
+ ```
100
+
101
+ Timezone
102
+
103
+ ```python
104
+ from egydata import timezone
105
+
106
+ print(timezone.name) # 'Africa/Cairo'
107
+ print(timezone.offset) # '+02:00' (standard time offset)
108
+
109
+ now = timezone.now() # current date/time in Egypt (timezone-aware datetime)
110
+ print(now.isoformat())
111
+
112
+ # Check if daylight saving time is active (Egypt resumed DST in 2023)
113
+ is_dst = timezone.isDST() # returns True if current offset is +03:00
114
+
115
+ # Optionally check a specific date
116
+ from datetime import datetime
117
+ date = datetime(2024, 8, 1)
118
+ print(timezone.isDST(date)) # True (during DST period)
119
+ ```
120
+
121
+ ---
122
+
123
+ API Reference
124
+
125
+ governorates
126
+
127
+ Method Parameters Returns Description
128
+ get_all() – list[Governorate] Returns all 27 Egyptian governorates.
129
+ get_by_code(code) code: str Governorate \| None Find governorate by its code (e.g., 'CAI').
130
+ get_by_id(id) id: int/str Governorate \| None Find governorate by its numeric ID.
131
+ search(query) query: str list[Governorate] Search by Arabic/English name or code (case‑insensitive, partial).
132
+
133
+ Governorate shape:
134
+ {'id': int, 'code': str, 'name': str, 'nameEn': str}
135
+
136
+ ---
137
+
138
+ cities
139
+
140
+ Method Parameters Returns Description
141
+ get_by_governorate(gov_code) gov_code: str list[City] Get all cities in a governorate (by its code).
142
+ get_by_id(id) id: int/str City \| None Find city by its numeric ID.
143
+ search(query) query: str list[City] Search by Arabic or English name (partial, case‑insensitive).
144
+
145
+ City shape:
146
+ {'id': int, 'name': str, 'nameEn': str, 'governorateCode': str}
147
+
148
+ ---
149
+
150
+ phoneArea
151
+
152
+ Method Parameters Returns Description
153
+ get_all() – list[AreaCode] Returns all landline and mobile area codes.
154
+ get_region(code) code: str AreaCode \| None Look up region info by area code.
155
+ get_code(region_name) region_name: str AreaCode \| None Find area code entry by region name (Arabic or English).
156
+
157
+ AreaCode shape:
158
+ {'code': str, 'region': str, 'regionEn': str}
159
+
160
+ ---
161
+
162
+ timezone
163
+
164
+ Property / Method Returns Description
165
+ name 'Africa/Cairo' IANA timezone identifier.
166
+ offset '+02:00' Standard UTC offset (without DST).
167
+ now() datetime Current date and time in Egypt (timezone‑aware).
168
+ isDST(date=None) bool Whether DST is active (for given date or now).
169
+
170
+ ---
171
+
172
+ Data Coverage
173
+
174
+ · 27 governorates with Arabic and English names and ISO‑like codes.
175
+ · 151 cities and districts across all governorates.
176
+ · 30 landline and mobile area codes (including mobile operators).
177
+ · Full timezone support for Africa/Cairo (DST‑aware).
178
+
179
+ All data is embedded in the package – no network requests, no external dependencies.
180
+
181
+ ---
182
+
183
+ Requirements
184
+
185
+ · Python 3.9 or later (uses standard library zoneinfo; for Python 3.8 you may need the backports.zoneinfo package).
186
+
187
+ ---
188
+
189
+ License
190
+
191
+ MIT
192
+
193
+ ```
@@ -0,0 +1,4 @@
1
+ from . import *
2
+
3
+
4
+ __version__ = "1.0.0"
@@ -0,0 +1,212 @@
1
+ cities = [
2
+ # Cairo (CAI)
3
+ {"id": 1, "name": "مدينة نصر", "nameEn": "Nasr City", "governorateCode": "CAI"},
4
+ {"id": 2, "name": "مصر الجديدة", "nameEn": "Heliopolis", "governorateCode": "CAI"},
5
+ {"id": 3, "name": "المعادي", "nameEn": "Maadi", "governorateCode": "CAI"},
6
+ {"id": 4, "name": "مصر القديمة", "nameEn": "Old Cairo", "governorateCode": "CAI"},
7
+ {"id": 5, "name": "شبرا", "nameEn": "Shubra", "governorateCode": "CAI"},
8
+ {"id": 6, "name": "عين شمس", "nameEn": "Ain Shams", "governorateCode": "CAI"},
9
+ {"id": 7, "name": "حلوان", "nameEn": "Helwan", "governorateCode": "CAI"},
10
+ {"id": 8, "name": "التجمع الخامس", "nameEn": "Fifth Settlement", "governorateCode": "CAI"},
11
+ {"id": 9, "name": "القاهرة الجديدة", "nameEn": "New Cairo", "governorateCode": "CAI"},
12
+ {"id": 10, "name": "المقطم", "nameEn": "Mokattam", "governorateCode": "CAI"},
13
+ # Alexandria (ALX)
14
+ {"id": 11, "name": "المنتزه", "nameEn": "Montaza", "governorateCode": "ALX"},
15
+ {"id": 12, "name": "وسط الإسكندرية", "nameEn": "Downtown Alexandria", "governorateCode": "ALX"},
16
+ {"id": 13, "name": "العجمي", "nameEn": "Agami", "governorateCode": "ALX"},
17
+ {"id": 14, "name": "سيدي بشر", "nameEn": "Sidi Bishr", "governorateCode": "ALX"},
18
+ {"id": 15, "name": "برج العرب", "nameEn": "Borg El Arab", "governorateCode": "ALX"},
19
+ {"id": 16, "name": "العامرية", "nameEn": "Amreya", "governorateCode": "ALX"},
20
+ # Giza (GIZ)
21
+ {"id": 17, "name": "الدقي", "nameEn": "Dokki", "governorateCode": "GIZ"},
22
+ {"id": 18, "name": "المهندسين", "nameEn": "Mohandessin", "governorateCode": "GIZ"},
23
+ {"id": 19, "name": "العجوزة", "nameEn": "Agouza", "governorateCode": "GIZ"},
24
+ {"id": 20, "name": "الهرم", "nameEn": "Haram", "governorateCode": "GIZ"},
25
+ {"id": 21, "name": "فيصل", "nameEn": "Faisal", "governorateCode": "GIZ"},
26
+ {"id": 22, "name": "6 أكتوبر", "nameEn": "6th of October", "governorateCode": "GIZ"},
27
+ {"id": 23, "name": "الشيخ زايد", "nameEn": "Sheikh Zayed", "governorateCode": "GIZ"},
28
+ {"id": 24, "name": "إمبابة", "nameEn": "Imbaba", "governorateCode": "GIZ"},
29
+ # Port Said (PTS)
30
+ {"id": 25, "name": "حي الشرق", "nameEn": "East District", "governorateCode": "PTS"},
31
+ {"id": 26, "name": "حي العرب", "nameEn": "Arab District", "governorateCode": "PTS"},
32
+ {"id": 27, "name": "حي الضواحي", "nameEn": "Suburbs District", "governorateCode": "PTS"},
33
+ {"id": 28, "name": "بورفؤاد", "nameEn": "Port Fouad", "governorateCode": "PTS"},
34
+ # Suez (SUZ)
35
+ {"id": 29, "name": "حي السويس", "nameEn": "Suez District", "governorateCode": "SUZ"},
36
+ {"id": 30, "name": "حي الأربعين", "nameEn": "Arbaeen District", "governorateCode": "SUZ"},
37
+ {"id": 31, "name": "عتاقة", "nameEn": "Ataka", "governorateCode": "SUZ"},
38
+ {"id": 32, "name": "حي فيصل", "nameEn": "Faisal District", "governorateCode": "SUZ"},
39
+ # Dakahlia (DKH)
40
+ {"id": 33, "name": "المنصورة", "nameEn": "Mansoura", "governorateCode": "DKH"},
41
+ {"id": 34, "name": "طلخا", "nameEn": "Talkha", "governorateCode": "DKH"},
42
+ {"id": 35, "name": "ميت غمر", "nameEn": "Mit Ghamr", "governorateCode": "DKH"},
43
+ {"id": 36, "name": "دكرنس", "nameEn": "Dikirnis", "governorateCode": "DKH"},
44
+ {"id": 37, "name": "أجا", "nameEn": "Aga", "governorateCode": "DKH"},
45
+ {"id": 38, "name": "السنبلاوين", "nameEn": "Sinbellawin", "governorateCode": "DKH"},
46
+ # Sharqia (SHR)
47
+ {"id": 39, "name": "الزقازيق", "nameEn": "Zagazig", "governorateCode": "SHR"},
48
+ {"id": 40, "name": "العاشر من رمضان", "nameEn": "10th of Ramadan", "governorateCode": "SHR"},
49
+ {"id": 41, "name": "بلبيس", "nameEn": "Bilbeis", "governorateCode": "SHR"},
50
+ {"id": 42, "name": "أبو حماد", "nameEn": "Abu Hammad", "governorateCode": "SHR"},
51
+ {"id": 43, "name": "منيا القمح", "nameEn": "Minya Al Qamh", "governorateCode": "SHR"},
52
+ {"id": 44, "name": "فاقوس", "nameEn": "Faqous", "governorateCode": "SHR"},
53
+ # Qalyubia (QLB)
54
+ {"id": 45, "name": "بنها", "nameEn": "Benha", "governorateCode": "QLB"},
55
+ {"id": 46, "name": "شبرا الخيمة", "nameEn": "Shubra El Kheima", "governorateCode": "QLB"},
56
+ {"id": 47, "name": "قليوب", "nameEn": "Qalyub", "governorateCode": "QLB"},
57
+ {"id": 48, "name": "القناطر الخيرية", "nameEn": "El Qanater El Khayreya", "governorateCode": "QLB"},
58
+ {"id": 49, "name": "طوخ", "nameEn": "Toukh", "governorateCode": "QLB"},
59
+ # Kafr El Sheikh (KFS)
60
+ {"id": 50, "name": "كفر الشيخ", "nameEn": "Kafr El Sheikh City", "governorateCode": "KFS"},
61
+ {"id": 51, "name": "دسوق", "nameEn": "Desouk", "governorateCode": "KFS"},
62
+ {"id": 52, "name": "فوه", "nameEn": "Fuwwah", "governorateCode": "KFS"},
63
+ {"id": 53, "name": "بيلا", "nameEn": "Bella", "governorateCode": "KFS"},
64
+ # Gharbia (GHR)
65
+ {"id": 54, "name": "طنطا", "nameEn": "Tanta", "governorateCode": "GHR"},
66
+ {"id": 55, "name": "المحلة الكبرى", "nameEn": "El Mahalla El Kubra", "governorateCode": "GHR"},
67
+ {"id": 56, "name": "كفر الزيات", "nameEn": "Kafr El Zayat", "governorateCode": "GHR"},
68
+ {"id": 57, "name": "زفتى", "nameEn": "Zefta", "governorateCode": "GHR"},
69
+ {"id": 58, "name": "السنطة", "nameEn": "Santa", "governorateCode": "GHR"},
70
+ # Monufia (MNF)
71
+ {"id": 59, "name": "شبين الكوم", "nameEn": "Shebin El Kom", "governorateCode": "MNF"},
72
+ {"id": 60, "name": "منوف", "nameEn": "Menouf", "governorateCode": "MNF"},
73
+ {"id": 61, "name": "أشمون", "nameEn": "Ashmoun", "governorateCode": "MNF"},
74
+ {"id": 62, "name": "السادات", "nameEn": "Sadat City", "governorateCode": "MNF"},
75
+ {"id": 63, "name": "تلا", "nameEn": "Tala", "governorateCode": "MNF"},
76
+ # Beheira (BHR)
77
+ {"id": 64, "name": "دمنهور", "nameEn": "Damanhour", "governorateCode": "BHR"},
78
+ {"id": 65, "name": "كفر الدوار", "nameEn": "Kafr El Dawar", "governorateCode": "BHR"},
79
+ {"id": 66, "name": "رشيد", "nameEn": "Rashid", "governorateCode": "BHR"},
80
+ {"id": 67, "name": "إدكو", "nameEn": "Edku", "governorateCode": "BHR"},
81
+ {"id": 68, "name": "أبو المطامير", "nameEn": "Abu El Matamir", "governorateCode": "BHR"},
82
+ # Ismailia (ISM)
83
+ {"id": 69, "name": "الإسماعيلية", "nameEn": "Ismailia City", "governorateCode": "ISM"},
84
+ {"id": 70, "name": "فايد", "nameEn": "Fayed", "governorateCode": "ISM"},
85
+ {"id": 71, "name": "القنطرة شرق", "nameEn": "Qantara East", "governorateCode": "ISM"},
86
+ {"id": 72, "name": "التل الكبير", "nameEn": "Tell El Kebir", "governorateCode": "ISM"},
87
+ # Damietta (DMT)
88
+ {"id": 73, "name": "دمياط", "nameEn": "Damietta City", "governorateCode": "DMT"},
89
+ {"id": 74, "name": "دمياط الجديدة", "nameEn": "New Damietta", "governorateCode": "DMT"},
90
+ {"id": 75, "name": "رأس البر", "nameEn": "Ras El Bar", "governorateCode": "DMT"},
91
+ {"id": 76, "name": "فارسكور", "nameEn": "Faraskour", "governorateCode": "DMT"},
92
+ # Faiyum (FYM)
93
+ {"id": 77, "name": "الفيوم", "nameEn": "Faiyum City", "governorateCode": "FYM"},
94
+ {"id": 78, "name": "إطسا", "nameEn": "Etsa", "governorateCode": "FYM"},
95
+ {"id": 79, "name": "طامية", "nameEn": "Tamiya", "governorateCode": "FYM"},
96
+ {"id": 80, "name": "سنورس", "nameEn": "Snouris", "governorateCode": "FYM"},
97
+ # Beni Suef (BNS)
98
+ {"id": 81, "name": "بني سويف", "nameEn": "Beni Suef City", "governorateCode": "BNS"},
99
+ {"id": 82, "name": "الواسطى", "nameEn": "El Wasta", "governorateCode": "BNS"},
100
+ {"id": 83, "name": "ناصر", "nameEn": "Nasser", "governorateCode": "BNS"},
101
+ {"id": 84, "name": "إهناسيا", "nameEn": "Ehnasia", "governorateCode": "BNS"},
102
+ # Minya (MNY)
103
+ {"id": 85, "name": "المنيا", "nameEn": "Minya City", "governorateCode": "MNY"},
104
+ {"id": 86, "name": "ملوي", "nameEn": "Mallawi", "governorateCode": "MNY"},
105
+ {"id": 87, "name": "سمالوط", "nameEn": "Samalut", "governorateCode": "MNY"},
106
+ {"id": 88, "name": "المنيا الجديدة", "nameEn": "New Minya", "governorateCode": "MNY"},
107
+ {"id": 89, "name": "أبو قرقاص", "nameEn": "Abu Qurqas", "governorateCode": "MNY"},
108
+ # Asyut (AST)
109
+ {"id": 90, "name": "أسيوط", "nameEn": "Asyut City", "governorateCode": "AST"},
110
+ {"id": 91, "name": "ديروط", "nameEn": "Dairut", "governorateCode": "AST"},
111
+ {"id": 92, "name": "القوصية", "nameEn": "El Qusiya", "governorateCode": "AST"},
112
+ {"id": 93, "name": "منفلوط", "nameEn": "Manfalut", "governorateCode": "AST"},
113
+ {"id": 94, "name": "أبنوب", "nameEn": "Abnoub", "governorateCode": "AST"},
114
+ # Sohag (SHG)
115
+ {"id": 95, "name": "سوهاج", "nameEn": "Sohag City", "governorateCode": "SHG"},
116
+ {"id": 96, "name": "أخميم", "nameEn": "Akhmim", "governorateCode": "SHG"},
117
+ {"id": 97, "name": "جرجا", "nameEn": "Girga", "governorateCode": "SHG"},
118
+ {"id": 98, "name": "طهطا", "nameEn": "Tahta", "governorateCode": "SHG"},
119
+ {"id": 99, "name": "المراغة", "nameEn": "El Maragha", "governorateCode": "SHG"},
120
+ # Qena (QNA)
121
+ {"id": 100, "name": "قنا", "nameEn": "Qena City", "governorateCode": "QNA"},
122
+ {"id": 101, "name": "نجع حمادي", "nameEn": "Nag Hammadi", "governorateCode": "QNA"},
123
+ {"id": 102, "name": "دشنا", "nameEn": "Dishna", "governorateCode": "QNA"},
124
+ {"id": 103, "name": "قوص", "nameEn": "Qus", "governorateCode": "QNA"},
125
+ # Luxor (LXR)
126
+ {"id": 104, "name": "الأقصر", "nameEn": "Luxor City", "governorateCode": "LXR"},
127
+ {"id": 105, "name": "إسنا", "nameEn": "Esna", "governorateCode": "LXR"},
128
+ {"id": 106, "name": "أرمنت", "nameEn": "Armant", "governorateCode": "LXR"},
129
+ {"id": 107, "name": "الطود", "nameEn": "El Tod", "governorateCode": "LXR"},
130
+ # Aswan (ASN)
131
+ {"id": 108, "name": "أسوان", "nameEn": "Aswan City", "governorateCode": "ASN"},
132
+ {"id": 109, "name": "كوم أمبو", "nameEn": "Kom Ombo", "governorateCode": "ASN"},
133
+ {"id": 110, "name": "إدفو", "nameEn": "Edfu", "governorateCode": "ASN"},
134
+ {"id": 111, "name": "دراو", "nameEn": "Daraw", "governorateCode": "ASN"},
135
+ {"id": 112, "name": "أبو سمبل", "nameEn": "Abu Simbel", "governorateCode": "ASN"},
136
+ # Red Sea (RED)
137
+ {"id": 113, "name": "الغردقة", "nameEn": "Hurghada", "governorateCode": "RED"},
138
+ {"id": 114, "name": "سفاجا", "nameEn": "Safaga", "governorateCode": "RED"},
139
+ {"id": 115, "name": "القصير", "nameEn": "El Quseir", "governorateCode": "RED"},
140
+ {"id": 116, "name": "مرسى علم", "nameEn": "Marsa Alam", "governorateCode": "RED"},
141
+ {"id": 117, "name": "رأس غارب", "nameEn": "Ras Ghareb", "governorateCode": "RED"},
142
+ # New Valley (WAD)
143
+ {"id": 118, "name": "الخارجة", "nameEn": "El Kharga", "governorateCode": "WAD"},
144
+ {"id": 119, "name": "الداخلة", "nameEn": "Dakhla", "governorateCode": "WAD"},
145
+ {"id": 120, "name": "الفرافرة", "nameEn": "Farafra", "governorateCode": "WAD"},
146
+ {"id": 121, "name": "باريس", "nameEn": "Paris", "governorateCode": "WAD"},
147
+ # Matruh (MTR)
148
+ {"id": 122, "name": "مرسى مطروح", "nameEn": "Marsa Matruh", "governorateCode": "MTR"},
149
+ {"id": 123, "name": "سيوة", "nameEn": "Siwa", "governorateCode": "MTR"},
150
+ {"id": 124, "name": "الحمام", "nameEn": "El Hamam", "governorateCode": "MTR"},
151
+ {"id": 125, "name": "العلمين", "nameEn": "El Alamein", "governorateCode": "MTR"},
152
+ {"id": 126, "name": "الضبعة", "nameEn": "El Dabaa", "governorateCode": "MTR"},
153
+ # North Sinai (SIN)
154
+ {"id": 127, "name": "العريش", "nameEn": "Arish", "governorateCode": "SIN"},
155
+ {"id": 128, "name": "الشيخ زويد", "nameEn": "Sheikh Zuweid", "governorateCode": "SIN"},
156
+ {"id": 129, "name": "رفح", "nameEn": "Rafah", "governorateCode": "SIN"},
157
+ {"id": 130, "name": "بئر العبد", "nameEn": "Bir al-Abed", "governorateCode": "SIN"},
158
+ # South Sinai (SIS)
159
+ {"id": 131, "name": "شرم الشيخ", "nameEn": "Sharm El Sheikh", "governorateCode": "SIS"},
160
+ {"id": 132, "name": "دهب", "nameEn": "Dahab", "governorateCode": "SIS"},
161
+ {"id": 133, "name": "نويبع", "nameEn": "Nuweiba", "governorateCode": "SIS"},
162
+ {"id": 134, "name": "طابا", "nameEn": "Taba", "governorateCode": "SIS"},
163
+ {"id": 135, "name": "سانت كاترين", "nameEn": "Saint Catherine", "governorateCode": "SIS"},
164
+ {"id": 136, "name": "الطور", "nameEn": "El Tor", "governorateCode": "SIS"},
165
+ # New Cities (4th Generation & Others)
166
+ {"id": 137, "name": "العاصمة الإدارية الجديدة", "nameEn": "New Administrative Capital", "governorateCode": "CAI"},
167
+ {"id": 138, "name": "الشروق", "nameEn": "El Shorouk", "governorateCode": "CAI"},
168
+ {"id": 139, "name": "بدر", "nameEn": "Badr City", "governorateCode": "CAI"},
169
+ {"id": 140, "name": "مدينتي", "nameEn": "Madinaty", "governorateCode": "CAI"},
170
+ {"id": 141, "name": "مدينة الرحاب", "nameEn": "Al Rehab", "governorateCode": "CAI"},
171
+ {"id": 142, "name": "15 مايو", "nameEn": "15 May City", "governorateCode": "CAI"},
172
+ {"id": 143, "name": "سفنكس الجديدة", "nameEn": "New Sphinx", "governorateCode": "GIZ"},
173
+ {"id": 144, "name": "حدائق أكتوبر", "nameEn": "Hadayek October", "governorateCode": "GIZ"},
174
+ {"id": 145, "name": "برج العرب الجديدة", "nameEn": "New Borg El Arab", "governorateCode": "ALX"},
175
+ {"id": 146, "name": "العبور", "nameEn": "El Obour", "governorateCode": "QLB"},
176
+ {"id": 147, "name": "العبور الجديدة", "nameEn": "New Obour", "governorateCode": "QLB"},
177
+ {"id": 148, "name": "المنصورة الجديدة", "nameEn": "New Mansoura", "governorateCode": "DKH"},
178
+ {"id": 149, "name": "العلمين الجديدة", "nameEn": "New Alamein", "governorateCode": "MTR"},
179
+ {"id": 150, "name": "مدينة الجلالة", "nameEn": "Galala City", "governorateCode": "SUZ"},
180
+ {"id": 151, "name": "مدينة ناصر (غرب أسيوط)", "nameEn": "Nasser City (West Asyut)", "governorateCode": "AST"},
181
+ ]
182
+
183
+ _id_map = {c["id"]: c for c in cities}
184
+ _gov_map = {}
185
+ for city in cities:
186
+ code = city["governorateCode"]
187
+ _gov_map.setdefault(code, []).append(city)
188
+
189
+ def get_by_governorate(gov_code):
190
+ """إرجاع قائمة المدن التابعة لمحافظة معينة (باستخدام كود المحافظة)."""
191
+ if not isinstance(gov_code, str):
192
+ return []
193
+ return _gov_map.get(gov_code.upper(), []).copy()
194
+
195
+ def get_by_id(id):
196
+ """إرجاع المدينة باستخدام الرقم التعريفي."""
197
+ try:
198
+ num_id = int(id)
199
+ except (ValueError, TypeError):
200
+ return None
201
+ return _id_map.get(num_id)
202
+
203
+ def search(query):
204
+ """البحث في المدن بالاسم العربي أو الإنجليزي."""
205
+ if not isinstance(query, str) or not query.strip():
206
+ return []
207
+ q = query.strip().lower()
208
+ result = []
209
+ for city in cities:
210
+ if q in city["name"] or q in city["nameEn"].lower():
211
+ result.append(city)
212
+ return result
@@ -0,0 +1,51 @@
1
+ governorates = [
2
+ {"id": 1, "code": "CAI", "name": "القاهرة", "nameEn": "Cairo"},
3
+ {"id": 2, "code": "ALX", "name": "الإسكندرية", "nameEn": "Alexandria"},
4
+ {"id": 3, "code": "GIZ", "name": "الجيزة", "nameEn": "Giza"},
5
+ {"id": 4, "code": "PTS", "name": "بورسعيد", "nameEn": "Port Said"},
6
+ {"id": 5, "code": "SUZ", "name": "السويس", "nameEn": "Suez"},
7
+ {"id": 6, "code": "DKH", "name": "الدقهلية", "nameEn": "Dakahlia"},
8
+ {"id": 7, "code": "SHR", "name": "الشرقية", "nameEn": "Sharqia"},
9
+ {"id": 8, "code": "QLB", "name": "القليوبية", "nameEn": "Qalyubia"},
10
+ {"id": 9, "code": "KFS", "name": "كفر الشيخ", "nameEn": "Kafr El Sheikh"},
11
+ {"id": 10, "code": "GHR", "name": "الغربية", "nameEn": "Gharbia"},
12
+ {"id": 11, "code": "MNF", "name": "المنوفية", "nameEn": "Monufia"},
13
+ {"id": 12, "code": "BHR", "name": "البحيرة", "nameEn": "Beheira"},
14
+ {"id": 13, "code": "ISM", "name": "الإسماعيلية", "nameEn": "Ismailia"},
15
+ {"id": 14, "code": "DMT", "name": "دمياط", "nameEn": "Damietta"},
16
+ {"id": 15, "code": "FYM", "name": "الفيوم", "nameEn": "Faiyum"},
17
+ {"id": 16, "code": "BNS", "name": "بني سويف", "nameEn": "Beni Suef"},
18
+ {"id": 17, "code": "MNY", "name": "المنيا", "nameEn": "Minya"},
19
+ {"id": 18, "code": "AST", "name": "أسيوط", "nameEn": "Asyut"},
20
+ {"id": 19, "code": "SHG", "name": "سوهاج", "nameEn": "Sohag"},
21
+ {"id": 20, "code": "QNA", "name": "قنا", "nameEn": "Qena"},
22
+ {"id": 21, "code": "LXR", "name": "الأقصر", "nameEn": "Luxor"},
23
+ {"id": 22, "code": "ASN", "name": "أسوان", "nameEn": "Aswan"},
24
+ {"id": 23, "code": "RED", "name": "البحر الأحمر", "nameEn": "Red Sea"},
25
+ {"id": 24, "code": "WAD", "name": "الوادي الجديد", "nameEn": "New Valley"},
26
+ {"id": 25, "code": "MTR", "name": "مطروح", "nameEn": "Matruh"},
27
+ {"id": 26, "code": "SIN", "name": "شمال سيناء", "nameEn": "North Sinai"},
28
+ {"id": 27, "code": "SIS", "name": "جنوب سيناء", "nameEn": "South Sinai"},
29
+ ]
30
+
31
+ _code_map = {g["code"]: g for g in governorates}
32
+ _id_map = {g["id"]: g for g in governorates}
33
+
34
+ def get_all(): return governorates.copy()
35
+
36
+ def get_by_code(code):
37
+ if not isinstance(code, str): return None
38
+ return _code_map.get(code.upper())
39
+
40
+ def get_by_id(id):
41
+ try: num_id = int(id)
42
+ except (ValueError, TypeError): return None
43
+ return _id_map.get(num_id)
44
+
45
+ def search(query):
46
+ if not isinstance(query, str) or not query.strip(): return []
47
+ q = query.strip().lower()
48
+ result = []
49
+ for g in governorates:
50
+ if (q in g["name"] or q in g["nameEn"].lower() or q in g["code"].lower()): result.append(g)
51
+ return result
@@ -0,0 +1,50 @@
1
+ area_codes = [
2
+ # Mobile Networks
3
+ {"code": "010", "region": "ڤودافون", "regionEn": "Vodafone"},
4
+ {"code": "011", "region": "اتصالات", "regionEn": "Etisalat"},
5
+ {"code": "012", "region": "أورنج", "regionEn": "Orange"},
6
+ {"code": "015", "region": "وي / العاشر من رمضان", "regionEn": "WE / 10th of Ramadan"},
7
+ # Landlines
8
+ {"code": "02", "region": "القاهرة والجيزة", "regionEn": "Cairo & Giza"},
9
+ {"code": "03", "region": "الإسكندرية", "regionEn": "Alexandria"},
10
+ {"code": "013", "region": "القليوبية (بنها)", "regionEn": "Qalyubia (Benha)"},
11
+ {"code": "040", "region": "الغربية (طنطا)", "regionEn": "Gharbia (Tanta)"},
12
+ {"code": "045", "region": "البحيرة (دمنهور)", "regionEn": "Beheira (Damanhour)"},
13
+ {"code": "046", "region": "مطروح", "regionEn": "Matruh"},
14
+ {"code": "047", "region": "كفر الشيخ", "regionEn": "Kafr El Sheikh"},
15
+ {"code": "048", "region": "المنوفية (شبين الكوم)", "regionEn": "Monufia (Shebin El Kom)"},
16
+ {"code": "050", "region": "الدقهلية (المنصورة)", "regionEn": "Dakahlia (Mansoura)"},
17
+ {"code": "055", "region": "الشرقية (الزقازيق)", "regionEn": "Sharqia (Zagazig)"},
18
+ {"code": "057", "region": "دمياط", "regionEn": "Damietta"},
19
+ {"code": "062", "region": "السويس", "regionEn": "Suez"},
20
+ {"code": "064", "region": "الإسماعيلية", "regionEn": "Ismailia"},
21
+ {"code": "065", "region": "البحر الأحمر (الغردقة)", "regionEn": "Red Sea (Hurghada)"},
22
+ {"code": "066", "region": "بورسعيد", "regionEn": "Port Said"},
23
+ {"code": "068", "region": "شمال سيناء (العريش)", "regionEn": "North Sinai (Arish)"},
24
+ {"code": "069", "region": "جنوب سيناء", "regionEn": "South Sinai"},
25
+ {"code": "082", "region": "بني سويف", "regionEn": "Beni Suef"},
26
+ {"code": "084", "region": "الفيوم", "regionEn": "Faiyum"},
27
+ {"code": "086", "region": "المنيا", "regionEn": "Minya"},
28
+ {"code": "088", "region": "أسيوط", "regionEn": "Asyut"},
29
+ {"code": "092", "region": "الوادي الجديد", "regionEn": "New Valley"},
30
+ {"code": "093", "region": "سوهاج", "regionEn": "Sohag"},
31
+ {"code": "095", "region": "الأقصر", "regionEn": "Luxor"},
32
+ {"code": "096", "region": "قنا", "regionEn": "Qena"},
33
+ {"code": "097", "region": "أسوان", "regionEn": "Aswan"},
34
+ ]
35
+
36
+ _code_map = {item["code"]: item for item in area_codes}
37
+
38
+ def get_all(): return area_codes.copy()
39
+
40
+ def get_region(code):
41
+ if not isinstance(code, str): return None
42
+ normalized = "0" + code.lstrip("0")
43
+ return _code_map.get(code) or _code_map.get(normalized)
44
+
45
+ def get_code(region_name):
46
+ if not isinstance(region_name, str) or not region_name.strip(): return None
47
+ q = region_name.strip().lower()
48
+ for item in area_codes:
49
+ if q in item["region"] or q in item["regionEn"].lower(): return item
50
+ return None
@@ -0,0 +1,14 @@
1
+ from datetime import datetime
2
+ from zoneinfo import ZoneInfo
3
+
4
+ name = "Africa/Cairo"
5
+ offset = "+02:00"
6
+
7
+ def now(): return datetime.now(ZoneInfo(name))
8
+
9
+ def isDST(date=None):
10
+ if date is None: date = datetime.now()
11
+ if date.tzinfo is None: date = date.replace(tzinfo=ZoneInfo(name))
12
+ else: date = date.astimezone(ZoneInfo(name))
13
+ offset_minutes = date.utcoffset().total_seconds() / 60
14
+ return offset_minutes == 180
@@ -0,0 +1,234 @@
1
+ Metadata-Version: 2.4
2
+ Name: egydata
3
+ Version: 1.0.0
4
+ Summary: Python library created by InnoSoft-Company tech team for Egyptian data: cities, governorates, timezones, phone numbers, etc.
5
+ Home-page: https://www.midoghanam.site/
6
+ Author: InnoSoft Company
7
+ Author-email: InnoSoft Company <midoghanam@hotmail.com>, Mohammed Ahmed Ghanam <midoghanam@hotmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026 InnoSoft
11
+ CEO & Founder: Mohamed Ahmed Ghanam
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ Keywords: egypt,data,cities,governorates,timezone,phone numbers
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Requires-Python: >=3.9
35
+ Description-Content-Type: text/markdown
36
+ License-File: LICENSE
37
+ Dynamic: author
38
+ Dynamic: home-page
39
+ Dynamic: license-file
40
+ Dynamic: requires-python
41
+
42
+ # Egydata
43
+
44
+ [![PyPI Version](https://img.shields.io/pypi/v/egydata.svg)](https://pypi.org/project/egydata/)
45
+ [![Python Versions](https://img.shields.io/pypi/pyversions/egydata.svg)](https://pypi.org/project/egydata/)
46
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/InnoSoft-Company/egydata/blob/main/LICENSE)
47
+
48
+ Structured Egyptian geographical and timezone data for Python.
49
+
50
+ 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).
51
+
52
+ [View on GitHub](https://github.com/InnoSoft-Company/egydata) | [View on PyPI](https://pypi.org/project/egydata/)
53
+
54
+ ---
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ pip install egydata
60
+ ```
61
+
62
+ Quick Start
63
+
64
+ ```python
65
+ from egydata import governorates, cities, phoneArea, timezone
66
+
67
+ # Get all governorates
68
+ all_govs = governorates.get_all()
69
+
70
+ # Find a city by name
71
+ maadi = cities.search("Maadi")
72
+
73
+ # Check current time in Egypt
74
+ now = timezone.now()
75
+ ```
76
+
77
+ ---
78
+
79
+ Usage
80
+
81
+ Governorates
82
+
83
+ ```python
84
+ from egydata import governorates
85
+
86
+ # Get all 27 governorates
87
+ all_govs = governorates.get_all()
88
+ # [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}, ...]
89
+
90
+ # Find by code
91
+ cairo = governorates.get_by_code("CAI")
92
+ # {'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}
93
+
94
+ # Find by id
95
+ alex = governorates.get_by_id(2)
96
+ # {'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}
97
+
98
+ # Search (Arabic, English, or code, partial match)
99
+ results = governorates.search("alex")
100
+ # [{'id': 2, 'code': 'ALX', 'name': 'الإسكندرية', 'nameEn': 'Alexandria'}]
101
+
102
+ ar_results = governorates.search("القاهرة")
103
+ # [{'id': 1, 'code': 'CAI', 'name': 'القاهرة', 'nameEn': 'Cairo'}]
104
+ ```
105
+
106
+ Cities
107
+
108
+ ```python
109
+ from egydata import cities
110
+
111
+ # Get cities by governorate code
112
+ cairo_cities = cities.get_by_governorate("CAI")
113
+ # [{'id': 1, 'name': 'مدينة نصر', 'nameEn': 'Nasr City', 'governorateCode': 'CAI'}, ...]
114
+
115
+ # Find by id
116
+ sharm = cities.get_by_id(131)
117
+ # {'id': 131, 'name': 'شرم الشيخ', 'nameEn': 'Sharm El Sheikh', 'governorateCode': 'SIS'}
118
+
119
+ # Search cities (Arabic or English, partial match)
120
+ found = cities.search("Maadi")
121
+ # [{'id': 3, 'name': 'المعادي', 'nameEn': 'Maadi', 'governorateCode': 'CAI'}]
122
+ ```
123
+
124
+ Phone Area Codes
125
+
126
+ ```python
127
+ from egydata import phoneArea
128
+
129
+ # Get all area codes (landline and mobile)
130
+ all_codes = phoneArea.get_all()
131
+ # [{'code': '010', 'region': 'ڤودافون', 'regionEn': 'Vodafone'}, ...]
132
+
133
+ # Look up region by code
134
+ region = phoneArea.get_region("03")
135
+ # {'code': '03', 'region': 'الإسكندرية', 'regionEn': 'Alexandria'}
136
+
137
+ # Find area code by region name (Arabic or English)
138
+ entry = phoneArea.get_code("Mansoura")
139
+ # {'code': '050', 'region': 'الدقهلية (المنصورة)', 'regionEn': 'Dakahlia (Mansoura)'}
140
+ ```
141
+
142
+ Timezone
143
+
144
+ ```python
145
+ from egydata import timezone
146
+
147
+ print(timezone.name) # 'Africa/Cairo'
148
+ print(timezone.offset) # '+02:00' (standard time offset)
149
+
150
+ now = timezone.now() # current date/time in Egypt (timezone-aware datetime)
151
+ print(now.isoformat())
152
+
153
+ # Check if daylight saving time is active (Egypt resumed DST in 2023)
154
+ is_dst = timezone.isDST() # returns True if current offset is +03:00
155
+
156
+ # Optionally check a specific date
157
+ from datetime import datetime
158
+ date = datetime(2024, 8, 1)
159
+ print(timezone.isDST(date)) # True (during DST period)
160
+ ```
161
+
162
+ ---
163
+
164
+ API Reference
165
+
166
+ governorates
167
+
168
+ Method Parameters Returns Description
169
+ get_all() – list[Governorate] Returns all 27 Egyptian governorates.
170
+ get_by_code(code) code: str Governorate \| None Find governorate by its code (e.g., 'CAI').
171
+ get_by_id(id) id: int/str Governorate \| None Find governorate by its numeric ID.
172
+ search(query) query: str list[Governorate] Search by Arabic/English name or code (case‑insensitive, partial).
173
+
174
+ Governorate shape:
175
+ {'id': int, 'code': str, 'name': str, 'nameEn': str}
176
+
177
+ ---
178
+
179
+ cities
180
+
181
+ Method Parameters Returns Description
182
+ get_by_governorate(gov_code) gov_code: str list[City] Get all cities in a governorate (by its code).
183
+ get_by_id(id) id: int/str City \| None Find city by its numeric ID.
184
+ search(query) query: str list[City] Search by Arabic or English name (partial, case‑insensitive).
185
+
186
+ City shape:
187
+ {'id': int, 'name': str, 'nameEn': str, 'governorateCode': str}
188
+
189
+ ---
190
+
191
+ phoneArea
192
+
193
+ Method Parameters Returns Description
194
+ get_all() – list[AreaCode] Returns all landline and mobile area codes.
195
+ get_region(code) code: str AreaCode \| None Look up region info by area code.
196
+ get_code(region_name) region_name: str AreaCode \| None Find area code entry by region name (Arabic or English).
197
+
198
+ AreaCode shape:
199
+ {'code': str, 'region': str, 'regionEn': str}
200
+
201
+ ---
202
+
203
+ timezone
204
+
205
+ Property / Method Returns Description
206
+ name 'Africa/Cairo' IANA timezone identifier.
207
+ offset '+02:00' Standard UTC offset (without DST).
208
+ now() datetime Current date and time in Egypt (timezone‑aware).
209
+ isDST(date=None) bool Whether DST is active (for given date or now).
210
+
211
+ ---
212
+
213
+ Data Coverage
214
+
215
+ · 27 governorates with Arabic and English names and ISO‑like codes.
216
+ · 151 cities and districts across all governorates.
217
+ · 30 landline and mobile area codes (including mobile operators).
218
+ · Full timezone support for Africa/Cairo (DST‑aware).
219
+
220
+ All data is embedded in the package – no network requests, no external dependencies.
221
+
222
+ ---
223
+
224
+ Requirements
225
+
226
+ · Python 3.9 or later (uses standard library zoneinfo; for Python 3.8 you may need the backports.zoneinfo package).
227
+
228
+ ---
229
+
230
+ License
231
+
232
+ MIT
233
+
234
+ ```
@@ -0,0 +1,13 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ egydata/__init__.py
6
+ egydata/cities.py
7
+ egydata/governorates.py
8
+ egydata/phoneAreas.py
9
+ egydata/timezones.py
10
+ egydata.egg-info/PKG-INFO
11
+ egydata.egg-info/SOURCES.txt
12
+ egydata.egg-info/dependency_links.txt
13
+ egydata.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ egydata
@@ -0,0 +1,23 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "egydata"
7
+ version = "1.0.0"
8
+ description = "Python library created by InnoSoft-Company tech team for Egyptian data: cities, governorates, timezones, phone numbers, etc."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ authors = [
12
+ { name = "InnoSoft Company", email = "midoghanam@hotmail.com" },
13
+ { name = "Mohammed Ahmed Ghanam", email = "midoghanam@hotmail.com" }
14
+ ]
15
+ license = { file = "LICENSE" }
16
+ keywords = ["egypt", "data", "cities", "governorates", "timezone", "phone numbers"]
17
+ classifiers = [
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ ]
22
+ dependencies = [
23
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
egydata-1.0.0/setup.py ADDED
@@ -0,0 +1,25 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="egydata",
5
+ version="1.0.0",
6
+ author="InnoSoft Company", # ← change to your company
7
+ author_email="midoghanam@hotmail.com", # ← company email
8
+ description="Python library for Egyptian data: cities, governorates, timezones, phone numbers, etc.",
9
+ long_description=open("README.md", encoding="utf-8").read(),
10
+ long_description_content_type="text/markdown",
11
+ url="https://www.midoghanam.site/", # can be your homepage or GitHub
12
+ project_urls={
13
+ "Source Code": "https://github.com/InnoSoft-Company/egydata",
14
+ "Bug Tracker": "https://github.com/InnoSoft-Company/egydata/issues",
15
+ "Documentation": "https://github.com/InnoSoft-Company/egydata#readme",
16
+ },
17
+ packages=find_packages(),
18
+ python_requires=">=3.9",
19
+ install_requires=[],
20
+ classifiers=[
21
+ "Programming Language :: Python :: 3",
22
+ "License :: OSI Approved :: MIT License",
23
+ "Operating System :: OS Independent",
24
+ ],
25
+ )