迪雅尼特 API
项目描述
迪雅尼特
用于获取土耳其宗教事务总统办公室内部API中的祈祷时间的Python接口。
API
单位
GeographicUnit
,所有地理单位的基础类。所有单位共享以下成员idx
:int
=> 内部ID(用于API)name
:str
=> 国家名称
Country
,国家单位State
,州单位(如果给定国家中没有州,则此单位将与Country
相同)country
:Country
=> 指向其国家的链接
Region
,城市/地区单位url
:str
=> 指向该特定地区的祈祷时间页面的URLstate
:State
=> 指向其州的链接country
:Country
=> 指向其国家的链接
PrayerTimes
,一天中的祈祷时间单位fajr
:time
sunrise
:time
dhuhr
:time
asr
:time
maghrib
:time
isha
:time
API
以下所有方法都是Diyanet
类的成员
get_countries
:() -> Iterator[Country]
=> 遍历所有可用国家get_states
:(country: Country) -> Iterator[State]
=> 遍历所有可用州get_regions
:(state: State) -> Iterator[Region]
=> 遍历所有可用地区get_country
/get_state
/get_region
=> 接受一个name
(以及根据上下文,覆盖自身的地理单位)并返回是否找到与给定名称匹配的内容。如果没有匹配项,则引发一个ValueError
。get_times
:(region: Region) -> PrayerTimes
=> 返回当天的祈祷时间
项目详情
关闭
diyanet-0.1.2.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6a27be1e6f1d97478954229d7d00cc9dbacd351d73af42b2803cd40f900f4b77 |
|
MD5 | 42465886e76c256f85d6e3475989f805 |
|
BLAKE2b-256 | 06dcd49dee76f16c109da5da70f7a22ab7fd3629af2f877813d3bd9cabbe869e |