Skip to main content

Kiahk logo

kiahk (Python)

PyPI version PyPI downloads / month pepy.tech downloads Python versions license

The first PyPI badge shows raw download counts (includes mirror + scanner bot traffic). The pepy.tech badge filters most bot traffic — closer to real human-install counts.

Coptic calendar arithmetic — date conversion, Easter, and feast days. Python port of kiahk. Identical results to all other ports against core/test-vectors.json.

Package: https://pypi.org/project/kiahk/

Install

pip install kiahk

Or from this repo for development:

cd py
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"

Quick start

from kiahk import CopticDate, GregorianDate, CopticCalendar

# Convert Gregorian → Coptic
g = GregorianDate(2025, 1, 11)
c = g.to_coptic()
print(c.year, c.month, c.day)  # 1741 5 3

# Convert Coptic → Gregorian
c2 = CopticDate(1742, 1, 1)
g2 = c2.to_gregorian()
print(g2.year, g2.month, g2.day)  # 2025 9 11

# Coptic Easter for a Gregorian year
easter = CopticCalendar.easter_date(2025)
print(easter.year, easter.month, easter.day)  # 2025 4 20

# All major feasts for a Gregorian year, sorted by date
for feast in CopticCalendar.year_feasts(2025):
    g = feast.gregorian_date
    print(f"{g.year}-{g.month:02d}-{g.day:02d}  {feast.name('en')}")

Sample output:

1741 5 3
2025 9 11
2025 4 20
2025-01-07  Nativity of Christ
2025-01-19  Epiphany (Theophany)
2025-02-10  Nineveh Fast
2025-02-24  Great Lent (start)
2025-04-07  Annunciation
2025-04-13  Palm Sunday
2025-04-20  Easter Sunday
2025-05-29  Ascension
2025-06-08  Pentecost
2025-08-22  Assumption of Mary
2025-09-27  Feast of the Cross

Render a date in English and Arabic

The library exposes Coptic month names in en + ar via CopticCalendar.month_name(month, locale). The full 13-entry table is also re-exported as COPTIC_MONTHS for callers that prefer raw data.

from kiahk import GregorianDate, CopticCalendar

g = GregorianDate(2025, 4, 20)
c = g.to_coptic()
print(f"{c.day} {CopticCalendar.month_name(c.month, 'en')} {c.year} AM")
print(f"{c.day} {CopticCalendar.month_name(c.month, 'ar')} {c.year} للشهداء")

Sample output:

12 Parmouti 1741 AM
12 برمودة 1741 للشهداء

API at a glance

Type / method Purpose
GregorianDate(y, m, d) Value type; raises InvalidGregorianDateError on bad input
GregorianDate.to_coptic() → CopticDate Convert
GregorianDate.to_native_date() / from_native_date(date) Interop with datetime.date
CopticDate(y, m, d) Value type; raises InvalidCopticDateError on bad input
CopticDate.to_gregorian() → GregorianDate Convert
Feast id, type, category, gregorian_date, .name(locale)
Feast.name("fr") Raises UnsupportedLocaleError for unknown locale
CopticCalendar.easter_date(year) → GregorianDate Coptic Easter
CopticCalendar.moveable_feast(feast_id, year) → Feast One moveable feast
CopticCalendar.year_feasts(year) → list[Feast] All feasts, sorted ascending
CopticCalendar.month_name(month, locale) → str Coptic month name; raises InvalidCopticMonthError / UnsupportedLocaleError
COPTIC_MONTHS 13-entry list of dicts (mirrors core/coptic_months.json)

Supported locales for Feast.name(...) and CopticCalendar.month_name(...): en, ar.

Run tests

cd py
.venv/bin/pytest -v

License

Licensed under the MIT License.

Maintained by Amir Magdy at WizardLabz.

Metadata

Release files for kiahk 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kiahk 0.1.6
File Size Uploaded Provenance Actions
kiahk-0.1.6.tar.gz 13.4 kB With provenance Details for kiahk-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kiahk 0.1.6
File Interpreter ABI Platform Actions
kiahk-0.1.6-py3-none-any.whl Python 3 none any Details for kiahk-0.1.6-py3-none-any.whl

Total release size: 25.0 kB

Release files / kiahk-0.1.6.tar.gz

Download URL kiahk-0.1.6.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0b5c16eba8327c81d83f455d789576167959e9bfa1e7e7c997e84e2b14fc9b1e
BLAKE2b-256 checksum
How to use checksums
44d8f6b659e4871ccf627e9c730cc71d3236e285424a1228a1b9b45672be15be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release files / kiahk-0.1.6-py3-none-any.whl

Download URL kiahk-0.1.6-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de728c9920741c82c8ff3f8afae0274d5559cb210b2f75db7519988a72545799
BLAKE2b-256 checksum
How to use checksums
7f1e14f6cd45a9e3f1622d2e5d2a8035817fe45268bf46a187fe7f03bdeeeb06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Security for kiahk 0.1.6

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kiahk-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

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.

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