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
Telegram Group Manager Bot Written In Python Using Pyrogram.

──「𝐂𝐡𝐢𝐤𝐚 𝐅𝐮𝐣𝐢𝐰𝐚𝐫𝐚」── Telegram Group Manager Bot Written In Python Using Pyrogram. Deploy To Heroku NOTE: I'm making this note to whoever

Wahyusaputra 3 Feb 12, 2022
Elemeno.ai standard development kit in Python

Overview A set of glue code and utilities to make using elemeno AI platform a smooth experience Free software: Apache Software License 2.0 Installatio

Elemeno AI 3 Dec 14, 2022
Make low level API wrapper in fast, easy.

The lowrapper is a library for quickly and easily creating an environment for tapping the API without implementation.

tasuren 1 Oct 25, 2022
OpenSea Python Bot coded purely in Python3.

OpenSea Python Bot coded purely in Python3. It utilises everything from OpenSea API to continuously monitor NFT's. It can be used to snipe or monitor if something falls below floor value.

OpenSea Elite Sniper 20 Dec 29, 2021
A simple python discord bot which give you a yogurt brand name, basing on a large database often updated.

YaourtBot A discord simple bot by Lopinosaurus Before using this code : ・Move env file to .env ・Change the channel ID on line 38 of bot.py to your #pi

The only one bunny who can dev. 0 May 09, 2022
Apple iTunes In-app purchase verification tool

itunes-iap v2 Python 2 & 3 compatible! Even with :mod:`asyncio` support! Source code: https://github.com/youknowone/itunes-iap Documentation: http://i

Jeong YunWon 129 Dec 10, 2022
A simple Discord bot that notifies users of new Abitti versions

A simple Discord bot that notifies users of new Abitti versions. New features might be added later on. If you have good ideas, feel free to do a PR.

1 Feb 11, 2022
An API wrapper around Discord API written in Python

Diskord This library is a maintained fork of now archived library, discord.py. A modern and easy to use API wrapper around Discord API written in Pyth

Diskord 36 Aug 22, 2022
Orca is an extensive and extendable Python 3.x library for the Discord API.

Orca is an extensive and extendable Python 3.x library for the Discord API.

RPS 4 Apr 03, 2022
A GETTR API client written in Python.

GUTTR A GETTR client library written in Python. I rushed to get this out so it's a bit janky. Open an issue if something is broken or missing. Getting

Roger Johnston 13 Nov 23, 2022
Install and manage Proton-GE and Luxtorpeda for Steam and Wine-GE for Lutris with this graphical user interface. Based on AUNaseef's ProtonUp, made with Python 3 and Qt 6.

ProtonUp-Qt Qt-based graphical user interface to install and manage Proton-GE installations for Steam and Wine-GE installations for Lutris. Based on A

638 Jan 02, 2023
Total servers you're in!

Discord-Servercount With this script you can check the amount of servers you are in, along with statistics of how many servers you are owner in and in

Nickyux 1 Feb 12, 2022
A PowerFull Telegram Mirror Bot.......

- [ DEAD REPO AND NO MORE UPDATE ] Slam Mirror Bot Slam Mirror Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Interne

αвιנтн 2 Nov 09, 2021
A Python API to retrieve and read MLB GameDay data

mlbgame mlbgame is a Python API to retrieve and read MLB GameDay data. mlbgame works with real time data, getting information as games are being playe

Zach Panzarino 493 Dec 13, 2022
A generative art library for NFT avatar and collectible projects.

Generative NFT Art Introduction The generative-art-nft repository is a library for creating generative art. It was developed for the purpose of creati

Rounak Banik 657 Jan 02, 2023
Um painel de consultas completo, com metodos atualizados.

Meu pix para eu comprar um café :D "25ef499b-d184-4aa1-9797-0a294be40d83" Painel-de-Consultas Completo. Feito por JOESTAR-TEAM Painel de consultas Com

Dio brando 10 Nov 19, 2021
Telegram bot implementing Lex Arcana using python-telegram-bot library.

Lex Arcana Telegram Bot 🤖 Telegram bot implementing Lex Arcana using python-telegram-bot library. This bot was evaluated for the course "Computer Eng

Nicolò Sonnino 6 Jun 22, 2022
A python API for BSCScan (Binance Smart Chain Explorer), available on PyPI.

bscscan-python A complete Python API for BscScan.com, available on PyPI. Powered by BscScan.com APIs. This is a gently modified fork of the etherscan-

Panagiotis Kotsias 246 Dec 31, 2022
Python Twitter API

Python Twitter Tools The Minimalist Twitter API for Python is a Python API for Twitter, everyone's favorite Web 2.0 Facebook-style status updater for

Mike Verdone 2.9k Jan 03, 2023
Quadrirrotor UFABC - ROS/Gazebo

QuadROS_UFABC - Repositório utilizado durante minha dissertação de mestrado para simular sistemas de controle e estimação para navegação de um quadrirrotor utilizando visão computacional.

Mateus Ribeiro 1 Dec 13, 2022