python-esolat
Asynchronous Python client for Malaysian prayer times (official JAKIM/e-Solat & WaktuSolat) and worldwide Aladhan calculation.
Designed as the core prayer times engine for Home Assistant eSolat GPS, eSolat Takwim, and esolat-mcp.
Features
- Automated Routing:
- Malaysia (GPS or Zone): Fetches official JAKIM timetable via WaktuSolat API (with automatic fallback to JAKIM e-Solat Takwim API).
- Worldwide (outside Malaysia): Automatically queries the Aladhan API with configurable calculation methods.
- Derived Islamic Times:
- Auto-calculates Isyraq (+12m) and Dhuha (+28m) after Syuruk/Sunrise.
- Hijri Calendar Integration:
- Full Hijri date parsing with friendly month names (e.g.
21 Jamadil Awwal 1448).
- Full Hijri date parsing with friendly month names (e.g.
- Major Islamic Events:
- Annual Islamic calendar events and public milestones (JAKIM for Malaysia, Aladhan globally).
- Modern Python:
- Async-first (
aiohttp), strongly typed dataclasses (PrayerTimesResult,PrayerTimesDay,IslamicEvent).
- Async-first (
Installation
pip install python-esolat
Quick Start
import asyncio
from esolat import EsolatClient
async def main():
async with EsolatClient() as client:
# 1. Fetch by GPS coordinates (Malaysia -> JAKIM / WaktuSolat)
res = await client.get_prayer_times(latitude=3.0118, longitude=101.7949)
print(f"Provider: {res.provider}, Zone: {res.zone}")
for day in res.prayers[:3]:
print(f"{day.date} ({day.hijri_full}): Subuh {day.fajr}, Dhuha {day.dhuha}, Zohor {day.dhuhr}")
# 2. Fetch by JAKIM Zone code
zone_res = await client.get_prayer_times(zone="SGR01")
print(f"SGR01 Day 1 Subuh: {zone_res.prayers[0].fajr}")
# 3. Fetch international coordinates (e.g. Makkah -> Aladhan)
makkah_res = await client.get_prayer_times(latitude=21.4225, longitude=39.8262)
print(f"Makkah provider: {makkah_res.provider}")
# 4. Significant Islamic milestones
events = await client.get_islamic_events(year=2026)
for ev in events[:3]:
print(f"{ev.gregorian_date}: {ev.event_name} ({ev.hijri_date})")
if __name__ == "__main__":
asyncio.run(main())
License
MIT © Zubir Jamal
Metadata
Release files for python-esolat 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_esolat-0.1.0.tar.gz | 12.6 kB | With provenance | Details for python_esolat-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_esolat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for python_esolat-0.1.0-py3-none-any.whl |
Total release size: 24.6 kB
Release files / python_esolat-0.1.0.tar.gz
| Download URL | python_esolat-0.1.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aeeee0157b8da9282f033b3e24e39c41d573ad0daf9691b8a90ab184c8acb6ef
|
|
BLAKE2b-256 checksum How to use checksums |
2d73b0311e9d3669a30eb5e65fafba792104e9fbf1b1d528cf5e568bea0e3fd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / python_esolat-0.1.0-py3-none-any.whl
| Download URL | python_esolat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cd559dcf3541c0130b7151ddbca7db7295c58fb6d72c907b94c98358fbdcf7b
|
|
BLAKE2b-256 checksum How to use checksums |
e1dbd06ba14455d085bb73ca92971c918b21a2036b455bc001dd766547a104f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logSecurity for python-esolat 0.1.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for python_esolat-0.1.0.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 Nov 24, 2026.
Transparency logA 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.