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
A bot to playing music in telegram vcg

Idzeroid Music|| Idzeroid Music adalah sebuah repository music bot telegram untuk memainkan suara di voice chat group anda. Fyi This repo im using for

idzeroid 1 Oct 26, 2021
An alternative to OpenFaaS nats-queue-worker for long-running functions

OpenFaas Job Worker OpenFaas Job Worker is a fork of project : OSCAR Worker - https://github.com/grycap/oscar-worker Thanks to Sebástian Risco @srisco

Sebastien Aucouturier 1 Jan 07, 2022
PyLyrics Is An [Open-Source] Bot That Can Help You Get Song Lyrics

PyLyrics-Bot Telegram Bot To Search Song Lyrics From Genuis. 🤖 Demo: 👨‍💻 Deploy: ❤ Deploy Your Own Bot : Star 🌟 Fork 🍴 & Deploy -Easy Way -Self-h

DAMIEN 12 Nov 12, 2022
A Python interface between Earth Engine and xarray for processing weather and climate data

wxee What is wxee? wxee was built to make processing gridded, mesoscale time series weather and climate data quick and easy by integrating the data ca

Aaron Zuspan 160 Dec 31, 2022
Download apps and remove icloud

Download apps and remove icloud

An example of using discordpy 2.0.0a to create a bot that supports slash commands

DpySlashBotExample An example of using discordpy 2.0.0a to create a bot that supports slash commands. This is not a fully complete bot, just an exampl

7 Oct 17, 2022
Send song lyrics to iMessage users using the Genius lyrics API

pyMessage Send song lyrics to iMessage users using the Genius lyrics API. Setup 1.) Open the main.py file, and add your API key on line 7. 2.) Install

therealkingnull 1 Jan 23, 2022
A Discord Bot that tracks and displays cryptocurrencies using the CoinMarketCap API

PyBo - A Crypto Inspired Discord Bot Pybo (paɪ boʊ) is a Discord bot that utilizes the discord.py API wrapper to run the bot. Pybo also integrates the

0 Nov 17, 2022
Image captioning service for healthcare domains in Vietnamese using VLP

Image captioning service for healthcare domains in Vietnamese using VLP This service is a web service that provides image captioning services for heal

CS-UIT AI Club 2 Nov 04, 2021
Este programa tem como objetivo o cadastro dos usuários. Assim, caso a autenticação seja feita, permitir que o usuário entre em determinado sistema ou programa.

LoginPy Este programa tem como objetivo o cadastro dos usuários. Assim, caso a autenticação seja feita, permitir que o usuário entre em determinado si

Jonas Carvalho 4 Dec 23, 2021
Many discord bots serving different purposes

Discord_Botlari Farklı amaçlara hizmet eden bir çok discord botu En kapsamlı Bot Game Bottur. bir oyun botudur discord sunucularında kullanılır. (tüm

1 Dec 21, 2021
A simple Telegram bot that analyses a given word, built with python-telegram-bot

Telegram Word Bot A simple Telegram bot that analyses a given word, built with python-telegram-bot. The bot is fairly useless - unless you often need

Chris N 2 Jul 14, 2022
Hydrathallies'in istegi uzerine yapildi :)

Telegram-Doviz-Bot Telegram Döviz Botu, Pyrogram ile yapıldı. Deploy Deploy on Heroku Deploy on local git clone https://github.com/lambda-stock/Telegr

2 Dec 08, 2021
TwitterBot-ImageCollector - Twitter bot that collects images from likes saves the image

TwitterBot-ImageCollector Bot de Twitter que recolecta imagenes a partir de los

Gx3 Studios 4 Jun 01, 2022
THE BEST INSTAGRAM AUTO LIKER GET MORE FOLLOWERS WITH THIS AUTOMATION

Hi 👋 , I'm Anandhu Ashok Developer making awesome things for awesome people 🚀 Connect with me: THE BEST INSTAGRAM AUTO LIKER GET MORE FOLLOWERS WITH

Anandhu Ashok 3 Jul 26, 2022
Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api

Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api. (you could really use this to track anything from the hypixel api)

1 Feb 08, 2022
Use an air-gapped Raspberry Pi Zero to sign for Bitcoin transactions! (and do other cool stuff)

Hello World! Build your own offline, airgapped Bitcoin transaction signing device for less than $35! Also generate seed word 24 or generate a seed phr

371 Dec 31, 2022
A simple Python library to integrate with the Heron Data API

Heron Python This library provides easy access to the Heron Data API from applications written in Python. Documentation No language-specific docs are

Heron Data 11 Nov 11, 2022
Exchange indicators & Basic functions for Binance API.

binance-ema Exchange indicators & Basic functions for Binance API. This python library has been written to calculate SMA, EMA, MACD etc. functions wit

Emre MENTEŞE 24 Jan 06, 2023
The Most advanced and User-Friendly Google Collab NoteBook to download Torrent directly to Google Drive with File or Magnet Link support and with added protection of Timeout Preventer.

Torrent To Google Drive (UI Added! 😊 ) A Simple and User-Friendly Google Collab Notebook with UI to download Torrent to Google Drive using (.Torrent)

Dr.Caduceus 33 Aug 16, 2022