An open-source, astronomy-based Islamic prayer time calculation engine written in pure Python.
Crescenton (Official Website)
- Accurate prayer times using latitude & longitude
- Supports major Sunni madhhab-based Asr calculations
- Multiple calculation methods:
- Muslim World League (MWL)
- Egyptian General Authority
- Karachi Method
- Umm al-Qura
- Qibla direction calculation using great-circle formula
- High-latitude adjustment support
- Fully offline (no internet/API required)
- Lightweight and dependency-free
v1.0.0 had import issues.
Use v1.0.1 or later.
pip install --upgrade pyislamic-prayer
from pyislamic_prayer import PrayerTimes, Madhab, KARACHI
lat = 33.6844 lon = 73.0479 tz = 5.5
pt = PrayerTimes( lat=lat, lon=lon, tz=tz, madhab=Madhab.HANAFI, method=KARACHI )
times = pt.calculate()
for prayer, time in times.items(): print(prayer, ":", time)
from pyislamic_prayer import qibla_direction
direction = qibla_direction(33.6844, 73.0479) print("Qibla Direction:", direction, "degrees")
| Method | Description |
|---|---|
| MWL | Muslim World League |
| EGYPT | Egyptian General Authority |
| KARACHI | University of Karachi |
| UMM_AL_QURA | Umm al-Qura University |
- ✔ Stable core engine
- ✔ Offline support
- ✔ Qibla direction working
- ✔ PyPI v1.0.1 fixed
MIT License
Crescenton builds:
- AI systems
- Educational tools
- Islamic tech solutions
- Software & innovation
https://cresenton.netlify.app/
Pull requests welcome.
Open an issue for major changes.
Star the repo ⭐ and share it