ethio-kit 0.5.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ethio-kit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: ethio-kit
3
+ Version: 0.5.0
4
+ Summary: Zero-dependency Ethiopian calendar, Bahire Hasab, Ethiopic script/IME/subtitle tools, offline regions, payment/receipt adapters, ETB words/formatting, phone, and Fayda toolkit.
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 ethio-kit contributors
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Keywords: ethiopia,ethiopian-calendar,bahire-hasab,geez,amharic,oromo,etb,chapa,telebirr,geo
28
+ Requires-Python: >=3.9
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Dynamic: license-file
32
+
33
+ # ethio-kit (v0.5.0)
34
+
35
+ Zero-dependency, browser-safe Ethiopian developer & creator foundation with **spec-locked parity** across **Python (PyPI)**, **JavaScript/TypeScript (npm)**, and **Dart/Flutter (pub.dev)**—verified against `spec/golden_vectors.json`.
36
+
37
+ ## Modules Included
38
+ - **Calendar & Bahire Hasab**: Beyene–Kudlek / Unicode ICU Ethiopian ↔ Gregorian conversion (`1800–2200` daily ICU verified), 12-hour EAT clock, Ge'ez numerals, Bahire Hasab computus (Fasika/Siklet/Nineveh/Abiy Tsom), and fixed Ethiopian holidays.
39
+ - **Ethiopic Script, IME & Creator Tools**: Homophone normalization (`normalize_ethiopic`), full labialized phonetic transliteration (`fidel_to_latin`), reverse phonetic typing (`latin_to_fidel`), URL slugifier (`ethiopic_slugify`), Ethiopic-aware subtitle line wrapping (`wrap_subtitle_lines`), and script composition stats (`count_ethiopic_stats`).
40
+ - **Offline Ethiopian Geo Dataset**: All 12 Regional States + 2 Chartered Cities with English/Amharic/Afaan Oromo names, capitals, dialing prefixes, and homophone-aware search (`list_regions`, `get_region`, `find_regions`).
41
+ - **Unified Payment & Receipt Adapter**: Transport-agnostic checkout request builders for Chapa, Telebirr, SantimPay, and ArifPay (`build_checkout_request`), zero-dependency browser/Node/Python/Dart Chapa HMAC-SHA256 webhook verification (`verify_chapa_webhook`), and bank/wallet receipt URL/reference parsing (`parse_receipt_reference`).
42
+ - **Phone, Fayda & ETB Currency**: ASCII-only Ethio Telecom (`09…`) / Safaricom (`07…`) parsing, 12-digit Fayda format checking, arbitrary-precision ETB formatting & splitting (`format_etb`, `split_birr`, `splitBirrBigInt`), and multilingual ETB amount-in-words (`etb_to_words` in `en`, `am`, `om`).
43
+
44
+ ## Running Tests Locally
45
+ ```bash
46
+ # Monorepo sync & browser-safety check
47
+ python3 scripts/check_sync.py
48
+
49
+ # Python
50
+ PYTHONPATH=python python3 -m unittest discover -s python/tests -v
51
+
52
+ # JavaScript / TypeScript (ESM + CJS + 146,462-day Unicode ICU check)
53
+ cd js && npm test
54
+
55
+ # Dart / Flutter
56
+ cd dart && dart pub get && dart analyze --fatal-infos && dart test
57
+ ```
58
+
59
+ ## Publishing
60
+ - **PyPI**: `cd python && python3 -m build && twine upload dist/*`
61
+ - **npm**: `cd js && npm publish --access public`
62
+ - **pub.dev**: `cd dart && dart pub publish`
@@ -0,0 +1,30 @@
1
+ # ethio-kit (v0.5.0)
2
+
3
+ Zero-dependency, browser-safe Ethiopian developer & creator foundation with **spec-locked parity** across **Python (PyPI)**, **JavaScript/TypeScript (npm)**, and **Dart/Flutter (pub.dev)**—verified against `spec/golden_vectors.json`.
4
+
5
+ ## Modules Included
6
+ - **Calendar & Bahire Hasab**: Beyene–Kudlek / Unicode ICU Ethiopian ↔ Gregorian conversion (`1800–2200` daily ICU verified), 12-hour EAT clock, Ge'ez numerals, Bahire Hasab computus (Fasika/Siklet/Nineveh/Abiy Tsom), and fixed Ethiopian holidays.
7
+ - **Ethiopic Script, IME & Creator Tools**: Homophone normalization (`normalize_ethiopic`), full labialized phonetic transliteration (`fidel_to_latin`), reverse phonetic typing (`latin_to_fidel`), URL slugifier (`ethiopic_slugify`), Ethiopic-aware subtitle line wrapping (`wrap_subtitle_lines`), and script composition stats (`count_ethiopic_stats`).
8
+ - **Offline Ethiopian Geo Dataset**: All 12 Regional States + 2 Chartered Cities with English/Amharic/Afaan Oromo names, capitals, dialing prefixes, and homophone-aware search (`list_regions`, `get_region`, `find_regions`).
9
+ - **Unified Payment & Receipt Adapter**: Transport-agnostic checkout request builders for Chapa, Telebirr, SantimPay, and ArifPay (`build_checkout_request`), zero-dependency browser/Node/Python/Dart Chapa HMAC-SHA256 webhook verification (`verify_chapa_webhook`), and bank/wallet receipt URL/reference parsing (`parse_receipt_reference`).
10
+ - **Phone, Fayda & ETB Currency**: ASCII-only Ethio Telecom (`09…`) / Safaricom (`07…`) parsing, 12-digit Fayda format checking, arbitrary-precision ETB formatting & splitting (`format_etb`, `split_birr`, `splitBirrBigInt`), and multilingual ETB amount-in-words (`etb_to_words` in `en`, `am`, `om`).
11
+
12
+ ## Running Tests Locally
13
+ ```bash
14
+ # Monorepo sync & browser-safety check
15
+ python3 scripts/check_sync.py
16
+
17
+ # Python
18
+ PYTHONPATH=python python3 -m unittest discover -s python/tests -v
19
+
20
+ # JavaScript / TypeScript (ESM + CJS + 146,462-day Unicode ICU check)
21
+ cd js && npm test
22
+
23
+ # Dart / Flutter
24
+ cd dart && dart pub get && dart analyze --fatal-infos && dart test
25
+ ```
26
+
27
+ ## Publishing
28
+ - **PyPI**: `cd python && python3 -m build && twine upload dist/*`
29
+ - **npm**: `cd js && npm publish --access public`
30
+ - **pub.dev**: `cd dart && dart pub publish`
@@ -0,0 +1,82 @@
1
+ """ethio-kit: Zero-dependency Ethiopian developer & creator toolkit (v0.5.0)."""
2
+
3
+ from .core import (
4
+ BahireHasab,
5
+ BirrSplit,
6
+ CheckoutRequest,
7
+ EthiopicDate,
8
+ EthiopianHoliday,
9
+ EthiopianRegion,
10
+ EthiopianTime,
11
+ PhoneInfo,
12
+ ReceiptReference,
13
+ ScriptStats,
14
+ is_ethiopian_leap_year,
15
+ ethiopian_month_days,
16
+ gregorian_to_ethiopian,
17
+ ethiopian_to_gregorian,
18
+ bahire_hasab,
19
+ ethiopian_fixed_holidays,
20
+ to_ethiopian_time,
21
+ from_ethiopian_time,
22
+ to_geez_numeral,
23
+ normalize_ethiopic,
24
+ fidel_to_latin,
25
+ latin_to_fidel,
26
+ ethiopic_slugify,
27
+ wrap_subtitle_lines,
28
+ count_ethiopic_stats,
29
+ list_regions,
30
+ get_region,
31
+ find_regions,
32
+ build_checkout_request,
33
+ verify_chapa_webhook,
34
+ parse_receipt_reference,
35
+ parse_ethiopian_phone,
36
+ validate_fayda_format,
37
+ validate_fayda_id,
38
+ format_etb,
39
+ etb_to_words,
40
+ split_birr,
41
+ )
42
+
43
+ __all__ = [
44
+ "BahireHasab",
45
+ "BirrSplit",
46
+ "CheckoutRequest",
47
+ "EthiopicDate",
48
+ "EthiopianHoliday",
49
+ "EthiopianRegion",
50
+ "EthiopianTime",
51
+ "PhoneInfo",
52
+ "ReceiptReference",
53
+ "ScriptStats",
54
+ "is_ethiopian_leap_year",
55
+ "ethiopian_month_days",
56
+ "gregorian_to_ethiopian",
57
+ "ethiopian_to_gregorian",
58
+ "bahire_hasab",
59
+ "ethiopian_fixed_holidays",
60
+ "to_ethiopian_time",
61
+ "from_ethiopian_time",
62
+ "to_geez_numeral",
63
+ "normalize_ethiopic",
64
+ "fidel_to_latin",
65
+ "latin_to_fidel",
66
+ "ethiopic_slugify",
67
+ "wrap_subtitle_lines",
68
+ "count_ethiopic_stats",
69
+ "list_regions",
70
+ "get_region",
71
+ "find_regions",
72
+ "build_checkout_request",
73
+ "verify_chapa_webhook",
74
+ "parse_receipt_reference",
75
+ "parse_ethiopian_phone",
76
+ "validate_fayda_format",
77
+ "validate_fayda_id",
78
+ "format_etb",
79
+ "etb_to_words",
80
+ "split_birr",
81
+ ]
82
+ __version__ = "0.5.0"