Search by

meismem / ethio-kit

meismeM

Zero-dependency Ethiopian developer and creator kit for PHP (Calendar, Ge'ez Numerals, Bahire Hasab, Business Days, Ethiopic Script & IME, 14 Regions, Phones, Fayda Verhoeff, ETB Currency & Words, Payments, Webhooks & 35+ Bank Receipts).

v0.7.0 2026-11-29 11:38 UTC

This package is auto-updated.

Last update: 2026-11-29 11:39:22 UTC


README

PyPI npm pub.dev Packagist

🌐 Live Interactive Playground: https://meismem.github.io/ethio-kit/
πŸ“š Full API Documentation: https://meismem.github.io/ethio-kit/docs.html

Zero-dependency, browser-safe Ethiopian developer & creator foundation with spec-locked parity across Python (PyPI), JavaScript/TypeScript (npm), Dart/Flutter (pub.dev), and PHP 8.1+ (Packagist / PSR-4)β€”verified against spec/golden_vectors.json.

Installation

# Python 3.9+ (includes `ethio-kit` CLI)
pip install ethio-kit

# JavaScript / TypeScript (ESM + CJS + Browser/Edge + `npx ethio-kit` CLI)
npm install ethio-kit

# Dart / Flutter 3.0+ (includes `ethio-kit` CLI executable)
dart pub add ethio_kit

# PHP 8.1+ (zero extensions beyond PHP core + `vendor/bin/ethio-kit` CLI)
composer require meismem/ethio-kit

CLI Quickstart

ethio-kit today --lang am --geez
ethio-kit cal 2019 1 --geez
ethio-kit holidays 2019 --islamic --tag christian
ethio-kit fasting 2019
ethio-kit nigs --major
ethio-kit fidel "selamta"
ethio-kit birr 1234.50 --words --lang am

Library Quickstart

Python

from ethio_kit import (
    gregorian_to_ethiopian,
    ethiopian_month_grid,
    ethiopian_fasting_periods,
    add_ethiopian_business_days,
    parse_receipt_reference,
    build_receipt_url,
    verify_fayda_checksum,
    etb_to_words,
)

ec = gregorian_to_ethiopian(2026, 11, 25)           # EthiopicDate(2019, 3, 16)
print(ec.format("ti", include_weekday=True, use_geez=True))
grid = ethiopian_month_grid(2019, 1, lang="am", include_holidays=True, include_nigs=True)
fasts = ethiopian_fasting_periods(2019)             # 6 Orthodox seasonal fasts
due = add_ethiopian_business_days(ec, 5)             # Skips weekends + Ethiopian holidays

ref = parse_receipt_reference("Your transaction reference is FT24321XYZ99. CBE")
url = build_receipt_url(ref.provider, ref.reference, account_suffix="12345678")
fayda = verify_fayda_checksum("2345-6789-0124")      # checksum_valid=True
print(etb_to_words("1234.50", lang="am"))

JavaScript / TypeScript

import {
  gregorianToEthiopian,
  formatEthiopicDate,
  ethiopianMonthGrid,
  isEthiopianFastingDay,
  parseReceiptReference,
  buildReceiptUrl,
  verifyFaydaChecksum,
  etbToWords,
} from "ethio-kit";

const ec = gregorianToEthiopian(2026, 11, 25);
console.log(formatEthiopicDate(ec, { lang: "ti", includeWeekday: true, useGeez: true }));
const grid = ethiopianMonthGrid(2019, 1, { lang: "am", includeNigs: true });
console.log(isEthiopianFastingDay(ec));

const ref = parseReceiptReference("Your transaction reference is FT24321XYZ99. CBE");
const url = buildReceiptUrl(ref.provider, ref.reference, { accountSuffix: "12345678" });
const fayda = verifyFaydaChecksum("2345-6789-0124");
console.log(etbToWords("1234.50", "am"));

Dart / Flutter

import 'package:ethio_kit/ethio_kit.dart';

void main() {
  final ec = gregorianToEthiopian(2026, 11, 25);
  print(ec.format(lang: 'ti', includeWeekday: true, useGeez: true));
  final grid = ethiopianMonthGrid(2019, 1, lang: 'am', includeNigs: true);
  print('Weeks in ${grid.monthName}: ${grid.weeks.length}');

  final ref = parseReceiptReference('Your transaction reference is FT24321XYZ99. CBE');
  final url = buildReceiptUrl(ref.provider!, ref.reference!, accountSuffix: '12345678');
  final fayda = verifyFaydaChecksum('2345-6789-0124');
  print(etbToWords('1234.50', lang: 'am'));
}

PHP 8.1+

<?php
use EthioKit\EthioKit;

$ec = EthioKit::gregorianToEthiopian(2026, 11, 25);  // EthiopicDate(2019, 3, 16)
echo $ec->format('ti', includeWeekday: true, useGeez: true) . PHP_EOL;
$grid = EthioKit::ethiopianMonthGrid(2019, 1, lang: 'am', includeNigs: true);
$due = EthioKit::addEthiopianBusinessDays($ec, 5);

$ref = EthioKit::parseReceiptReference('Your transaction reference is FT24321XYZ99. CBE');
$url = EthioKit::buildReceiptUrl($ref->provider, $ref->reference, '12345678');
$fayda = EthioKit::verifyFaydaChecksum('2345-6789-0124'); // $fayda->checksumValid === true
echo EthioKit::etbToWords('1234.50', 'am') . PHP_EOL;

4-Language Per-Feature Support Matrix (v0.7.0)

Domain & Capability Python (ethio-kit) JS / TS (ethio-kit) Dart / Flutter (ethio_kit) PHP 8.1+ (meismem/ethio-kit)
Ethiopian ↔ Gregorian (1800–2200 ICU verified) βœ… βœ… βœ… βœ…
4-Language Formatting (am, en, om, ti) + Ge'ez βœ… βœ… βœ… βœ…
13-Month Date Arithmetic, Diffs, Boundaries & Ranges βœ… βœ… βœ… βœ…
2D Month/Year Grids (MonthGrid) & ASCII/Ge'ez Table βœ… βœ… βœ… βœ…
Full Bahire Hasab (10 Movable Feasts/Fasts, Metqi=30) βœ… βœ… βœ… βœ…
Public + Tabular/Custom Islamic Holidays + Tag Filter βœ… βœ… βœ… βœ…
6 Orthodox Fasting Seasons + is_ethiopian_fasting_day βœ… βœ… βœ… βœ…
30-Day Monthly Orthodox Nigs + Pagume 3 Commemorations βœ… βœ… βœ… βœ…
Ethiopian Business-Day Calculator (Β±N SLA days) βœ… βœ… βœ… βœ…
12-Hour Ethiopian Clock Formatting & Time Arithmetic βœ… βœ… βœ… βœ…
Bidirectional Ge'ez Numerals (1..99999999+) βœ… βœ… βœ… βœ…
Ethiopic Homophone Normalization & Phonetic IME βœ… βœ… βœ… βœ…
Creator Slugify, Subtitle Line Wrap & Script Stats βœ… βœ… βœ… βœ…
14 Regions & Chartered Cities + Dialing Prefixes βœ… βœ… βœ… βœ…
Ethiopian Mobile, Regional Landline & Shortcode Parser βœ… βœ… βœ… βœ…
12-Digit FIN / 16-Digit FAN Fayda Verhoeff Checksum βœ… βœ… βœ… βœ…
Arbitrary-Precision ETB Formatting & Multilingual Words βœ… βœ… βœ… βœ…
Chapa, Telebirr Fabric, SantimPay & ArifPay Builders βœ… βœ… βœ… βœ…
Constant-Time Webhook HMAC + Timestamp Replay Guard βœ… βœ… βœ… βœ…
35 Ethiopian Bank & Mobile Wallet SMS/URL Receipts βœ… βœ… βœ… βœ…
Dedicated ethio-kit Command-Line Interface (CLI) βœ… βœ… βœ… βœ…

Modules & Drop-in UI Examples

  • Calendar, Grids, Bahire Hasab, Fasting, Nigs & Business Days: Beyene–Kudlek / Unicode ICU conversion, am/en/om/ti formatting, ethiopian_month_grid / ethiopian_year_grid / format_month_calendar, 10 Bahire Hasab movable feasts/fasts, 6 Orthodox fasting periods, 30 monthly Nigs commemorations, category-tagged public + Islamic holidays (next_ethiopian_holiday), and Ethiopian business-day calculator.
  • Ethiopic Script, Ejective/Labialized IME & Creator Tools: Homophone normalization (normalize_ethiopic), reversible phonetic transliteration (fidel_to_latin, latin_to_fidel), URL slugifier (ethiopic_slugify), subtitle wrapping (wrap_subtitle_lines), and script composition stats (count_ethiopic_stats).
  • Offline Ethiopian Geo Dataset, Phones, Fayda & ETB: All 14 Ethiopian divisions, mobile/landline/shortcode phone validation, MOSIP Verhoeff Fayda ID verification, arbitrary-precision ETB splitting/formatting, and etb_to_words (en, am, om).
  • Unified Payments, Webhooks & 35+ Bank Receipts: HTTPS-by-default checkout builders (with redacted API-key reprs), Telebirr RSA canonicalizer, strict constant-time HMAC-SHA256 + is_webhook_timestamp_fresh replay guard, and receipt extraction across 35 Ethiopian banks & wallets.
  • UI Starter Kits (examples/): Headless React calendar hooks (examples/react-ethiopian-calendar-hook.jsx), Flutter 13-month calendar widget (examples/flutter_ethiopian_calendar.dart), React/Flutter checkout forms, and Laravel webhook controller.

Running Tests Locally

# Auto-generate js/src/index.cjs from js/src/index.mjs & verify monorepo sync
python3 scripts/build_cjs.py
python3 scripts/check_sync.py

# Python
PYTHONPATH=python python3 -m unittest discover -s python/tests -v

# JavaScript / TypeScript (ESM + CJS + 146,462-day Unicode ICU check)
cd js && npm test

# Dart / Flutter (100% public_member_api_docs + golden vectors)
cd dart && dart pub get && dart analyze --fatal-infos && dart test

# PHP 8.1+
php php/tests/GoldenVectorsTest.php

Documentation & Interactive Playground