Python interface for internal API of Turkey's Presidency of Religious Affairs to get prayer times.
GeographicUnit
, base class for all geographic units. All units share these membersidx
:int
=> Internal ID (to use in API)name
:str
=> Name of the country
Country
, unit for countriesState
, unit for states (if no states present in given country, this will be same withCountry
)country
:Country
=> A link to it's country
Region
, unit for citites/regionsurl
:str
=> URL that points out to prayer times page for that specific regionstate
:State
=> A link to it's statecountry
:Country
=> A link to it's country
PrayerTimes
, unit for prayer times of a dayfajr
:time
sunrise
:time
dhuhr
:time
asr
:time
maghrib
:time
isha
:time
All methods described below are members of Diyanet
class
get_countries
:() -> Iterator[Country]
=> Iterates through all available countriesget_states
:(country: Country) -> Iterator[State]
=> Iterates through all available statesget_regions
:(state: State) -> Iterator[Region]
=> Iterates through all available regionsget_country
/get_state
/get_region
=> Takes aname
(and depending on the context, a geographical unit that covers itself) and returns if it finds something that matches with given name. If there isn't any match, it raises aValueError
.get_times
:(region: Region) -> PrayerTimes
=> Returns prayer times for the current day