alphahm / adhanpy

An offline prayer times library
MIT License
19 stars 6 forks source link

[feat]: make the `PrayerTimes` class indexable by prayer name #29

Open mohamedrezk122 opened 2 months ago

mohamedrezk122 commented 2 months ago

Use prayer name as an index is sometimes useful while looping over prayers instead of calling eval function

Examples:

print(prayer_times["fajr"])
for prayer in prayers:
    time = prayer_times[prayer].strftime('%H:%M')