Pythonic wrapper for the Aladhan prayer times API.

Overview

aladhan.py is a pythonic wrapper for the Aladhan prayer times API.

PyPI version info Supported Python versions Discord support server Code coverage

Installation

Python 3.6 or higher is required.

To Install aladhan.py with pip:

pip install aladhan.py

To install only with synchronous requirements

pip install aladhan.py[sync]

To install only with asynchronous requirements

pip install aladhan.py[async]

Quick Example

import aladhan

client = aladhan.Client()
prayer_times = client.get_timings_by_address("London")
for prayer_time in prayer_times:
    print(prayer_time)

You can look into more examples here

Contribute

Support

If you are having issues, please let me know by joining the discord support server

License

The project is licensed under the MIT license.

Links

You might also like...
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% api coverage most of the codebase is documented

Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

An API Wrapper for Gofile API

Gofile2 from gofile2 import Gofile g_a = Gofile() print(g_a.upload(file="/home/itz-fork/photo.png")) An API Wrapper for Gofile API. About API Gofile

A simple API wrapper for the Tenor API

Gifpy A simple API wrapper for the Tenor API Installation Python 3.9 or higher is recommended python3 -m pip install gifpy Clone repository: $ git cl

A Python API wrapper for the Twitter API!

PyTweet PyTweet is an api wrapper made for twitter using twitter's api version 2! Installation Windows py3 -m pip install PyTweet Linux python -m pip

Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

Comments
  • [TODO] Undocumented endpoints to cover.

    [TODO] Undocumented endpoints to cover.

    These are undocumented endpoints that need to be covered.

    Info

    • [x] status
    • [x] specialDays
    • [x] islamicMonths

    Date Converters

    • [x] hToG
    • [x] gToH
    • [x] gToHCalendar
    • [x] hToGCalendar
    • [x] islamicYearFromGregorianForRamadan

    Holdays

    • [x] nextHijriHoliday
    • [x] hijriHolidays
    • [x] islamicHolidaysByHijriYear

    Current ...

    • [x] currentTime
    • [x] currentDate
    • [x] currentTimestamp
    • [x] currentIslamicYear
    • [x] currentIslamicMonth

    Next Prayer

    • [x] nextPrayerByAddress
    enhancement 
    opened by HETHAT 1
  • pep8 501 Compliance (80w, 72w for __doc__ and #)

    pep8 501 Compliance (80w, 72w for __doc__ and #)

    Summary

    Hi, I've implemented the pep8 E501 rule into your project, including wrapping the code over 80 characters for better readability. I also wrapped the docstring (excluding docstest) to 72 characters.

    Form Pep8 Python official guide style:

    Limit all lines to a maximum of 79 characters. For flowing long blocks of text with fewer structural restrictions (docstrings or comments), the line length should be limited to 72 characters.

    Limiting the required editor window width makes it possible to have several files open side by side, and works well when using code review tools that present the two versions in adjacent columns.

    The default wrapping in most tools disrupts the visual structure of the code, making it more difficult to understand. The limits are chosen to avoid wrapping in editors with the window width set to 80, even if the tool places a marker glyph in the final column when wrapping lines. Some web based tools may not offer dynamic line wrapping at all.

    Some teams strongly prefer a longer line length. For code maintained exclusively or primarily by a team that can reach agreement on this issue, it is okay to increase the line length limit up to 99 characters, provided that comments and docstrings are still wrapped at 72 characters.

    The Python standard library is conservative and requires limiting lines to 79 characters (and docstrings/comments to 72).

    The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation.

    I took the time to also fix a minor typo (dictionnary => dictionary) Have a nice day !

    Checklist

    • [ ] If code changes were made then they have been tested.
      • [ ] I have updated the documentation to reflect the changes.
    • [ ] This PR fixes an issue.
    • [ ] This PR adds something new.
    • [ ] This PR is a breaking change.
    • [X] This PR is not a code change (e.g. documentation, README, ...)
    documentation 
    opened by Sigmanificient 1
  • 1 day behind

    1 day behind

    Summary

    The given results are for 1 day behind the date wanted.

    Reproduction Steps

    import aladhan
    
    client = aladhan.Client()
    timings = client.get_timings(34, 4, date=aladhan.TimingsDateArg("01-01-2022"))
    print(timings.asr)
    

    Minimal Reproducible Code

    No response

    Expected Results

    <Prayer name='Asr', time=D'16:11 01-01-2022'>
    

    Actual Results

    <Prayer name='Asr', time=D'16:11 31-12-2021'>
    

    System Information

    - Python v3.8.10-final
    - aladhan.py v1.2.0-final
    - aiohttp v3.7.4.post0
    - requests v2.28.1
    - System info: Linux 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
    

    Checklist

    • [X] I have searched the open issues for duplicates.
    • [X] I have shown the entire traceback, if possible.

    Additional Context

    No response

    bug 
    opened by HETHAT 0
Releases(v1.2.0)
  • v1.2.0(Aug 27, 2022)

    aladhan.py 1.2.0

    Changelog

    Added

    • Covered current event endpoints.
      • Client.get_current_time
      • Client.get_current_date
      • Client.get_current_timestamp
      • Client.get_current_islamic_year
      • Client.get_current_islamic_month
    • Covered holidays endpoints.
      • Client.get_next_hijri_holiday
      • Client.get_hijri_holidays
      • Client.get_islamic_holidays
    • Covered info endpoints
      • Client.get_status
      • Client.get_special_days
      • Client.get_islamic_months
    • Covered next prayer endpoints
      • Client.get_next_prayer_by_address
      • NextPrayerData
    • aladhan.BaseDate
    • aladhan.enums.Shafaq
    • Added a shafaq parameter for Parameters
    • aladhan.exceptions.InvalidShafaq
    • aladhan.exceptions.TooManyRequests
    • Adding the new changes to the api.
      • Timings.first_third
      • Timings.last_third
    • Auto management of rate limits.

    Changed

    • Fixed date converters, they were switched around ...
    • Prayer.data is now Union[Data, NextPrayerData]

    Removed

    • No longer supports Python v3.6.
    • Prayer.timings

    Links

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Aug 4, 2021)

    aladhan.py 1.1.0

    Changelog

    Added

    • Covering more 5 endpoints about date converting
      • Client.get_hijri_from_gregorian
      • Client.get_gregorian_from_hijri
      • Client.get_hijri_calendar_from_gregorian
      • Client.get_gregorian_calendar_from_hijri
      • Client.get_islamic_year_from_gregorian_for_ramadan

    Changed

    • The following are now optional
      • Date.data
      • Date.readable
      • Date.timestamp

    Links

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jul 30, 2021)

    aladhan.py 1.0.0

    Changelog

    Added

    • Synchronous usage for the module !
    • __all__ and __slots__ for better performance.
    • Module exceptions.
    • logging is now implemented.
    • Method.params_str a string in "fajr,maghrib,isha" format.

    Changed

    • Renamed DefaultArgs to Parameters
      • Renamed Meta.default_args to Meta.parameters
      • Renamed defaults parameter in all getters to params
    • Timings.next_prayer now returns None instead if upcoming prayer wasn't in date. and Its no longer awaitable.
    • Method.params changed to be a property.
    • Schools, MidnightModes, LatitudeAdjustmentMethods are now enums.

    Removed

    • AsyncClient. Replaced with Client(is_async=True) instead.

    Look into README for more info!

    Links

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jul 7, 2021)

  • v0.1.4(Jun 10, 2021)

  • v0.1.3(May 7, 2021)

  • v0.1.2(May 2, 2021)

  • v0.1.1(Apr 24, 2021)

  • v0.1.0(Apr 24, 2021)

    aladhan.py 0.1.0

    Whats new?

    • AsyncClient getters no longer return Data object the return now Timings instead, you can still get the Data object using Timings.data.
    • Edited docsstrings to make it more readable.
    • Removed all __str__ methods and replaced it with __repr__.
    • implemented __hash__ to some classes.
    • Added a requirement that i forgot to add. 🤦‍♂️
    • Edited examples so they work for the new release.

    links

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(Apr 23, 2021)

  • v0.0.1(Apr 23, 2021)

Owner
HETHAT
Just a normal 17 yo guy.
HETHAT
Clippin n grafting Backend

Clipping' n Grafting Presenting you, 🎉 Clippin' n Grafting 🎉 , your very own ecommerce website displaying all your artsy-craftsy stuff. Not only the

Google-Developer-Student-Club-ISquareIT (GDSC I²IT) 2 Oct 22, 2021
Telegram File to Link Fastest Bot , also used for movies streaming

Telegram File Stream Bot ! A Telegram bot to stream files to web. Report a Bug | Request Feature About This Bot This bot will give you stream links fo

Avishkar Patil 194 Jan 07, 2023
Get notifications in your Discord server of any software releases from Apple.

Apple Releases Get notifications in your Discord server of any software releases from Apple. Running To locally host your own instance, create a Disco

adam 17 Oct 22, 2022
Discord Rich Presence implementation for Plex.

Perplex Perplex is a Discord Rich Presence implementation for Plex. Features Modern and beautiful Rich Presence for both movies and TV shows The Movie

Ethan 52 Dec 19, 2022
Send notification to your telegram group/channel/private whenever a new video is uploaded on a youtube channel!

YouTube Feeds Bot. Send notification to your telegram group/channel/private whenever a new video is uploaded on a youtube channel! Variables BOT_TOKEN

Aditya 30 Dec 07, 2022
A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

Installation | Important | Changelogs | Discord NOTE: Hazard is not finished! You can expect bugs, crashes, and non-working functions. Please make an

Rdimo 470 Aug 09, 2022
Ever wanted a dashboard for making your antispam? This is it.

Ever wanted a dashboard for making your antispam? This is it.

Skelmis 1 Oct 27, 2021
Telegram bot untuk mencari jawaban dibrainly, support inline juga

Brainly-Telebot Bot Untuk Mencari Jawaban Dibrainly Jika ingin clone. Boleh kok Dibuat dengan python menggunakan MTproto Library. Yaitu Pyrogram Bot y

... 7 Mar 17, 2022
企业微信消息推送的python封装接口,让你轻松用python实现对企业微信的消息推送

👋 corpwechat-bot是一个python封装的企业机器人&应用消息推送库,通过企业微信提供的api实现。 利用本库,你可以轻松地实现从服务器端发送一条文本、图片、视频、markdown等等消息到你的微信手机端,而不依赖于其他的第三方应用,如ServerChan。 如果喜欢该项目,记得给个

Chaopeng 161 Jan 06, 2023
Public API client for GETTR, a "non-bias [sic] social network," designed for data archival and analysis.

GoGettr GoGettr is an API client for GETTR, a "non-bias [sic] social network." (We will not reward their domain with a hyperlink.) GoGettr is built an

Stanford Internet Observatory 72 Dec 14, 2022
Herramienta para transferir eventos de Sucuri WAF hacia Azure Monitor Log Analytics.

Transfiere eventos de Sucuri hacia Azure LogAnalytics Script para transferir eventos del Sucuri Web Application Firewall (WAF) hacia Azure LogAnalytic

CSIRT-RD 1 Dec 22, 2021
A BOT TO FIND ID OF A STICKER.

sticker id A BOT TO FIND ID OF A STICKER. THIS REPOSITORY HAVE TWO BRANCHES FOR DEPLOY WITH COMMAND & WITHOUT COMMAND. Mandatory variables API_ID - Ge

Ashik Muhammed 3 Dec 29, 2022
Collect links to profiles by username through search engines

Marple Summary Collect links to profiles by username through search engines (currently Google and DuckDuckGo). Quick Start ./marple.py soxoj Results:

125 Dec 19, 2022
A discord bot wrapper for python have slash command

A discord bot wrapper for python have slash command

4 Dec 04, 2021
A discord token creator that uses the service capmonster for captcha solving!

Discord Token Creator A discord token creator that uses the service capmonster for captcha solving! Report Bug · Request Feature Features Autojoin dis

dropout 41 Oct 25, 2021
Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX)

Fastest Pancakeswap Sniper BOT TORNADO CASH 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ AUTO BUY TOKEN ON LAUNCH AFTER ADD LIQUIDITY ⭐️ ⭐️ Support Uniswap

Crypto Trader 7 Jan 31, 2022
Unarchive Bot for Telegram

Telegram UnArchiver Bot UnArchiveBot: 🇬🇧 Bot that allows you to extract supported archive formats in telegram. 🇹🇷 Desteklenen arşiv biçimleri tele

Hüzünlü Artemis [HuzunluArtemis] 25 May 07, 2022
A basic Ubisoft API wrapper created in python.

UbisoftAPI A basic Ubisoft API wrapper created in python. I will be updating this with more endpoints as time goes on. Please note that this is my fir

Ethan 2 Oct 31, 2021
DEPRECATED - Official Python Client for the Discogs API

⚠️ DEPRECATED This repository is no longer maintained. You can still use a REST client like Requests or other third-party Python library to access the

Discogs 483 Dec 31, 2022
Darkflame Universe Account Manager

Darkflame Universe Account Manager This is a quick and simple web application intended for account creation and management for a DLU instance created

31 Nov 29, 2022