A library for retrieving data from The London Unified Prayer Timetable.
Mainly a Python library to retrieve, store and update a local prayer timetable for the London region using a format that happens to feed https://www.eastlondonmosque.org.uk.
Also provided is a command line utility to manage and query the timetable.
The library can:
Once initialised, the cli can:
pip install london-unified-prayer-times
Alternatively Arch users can install via the AUR at: https://aur.archlinux.org/packages/python-london-unified-prayer-times/
This library is designed to download timetable data held in HTML format and accessible via a URL. It's up to the user of the library to provide that URL. There is at least one such URL in the public domain, but that address isn't provided here.
And yes, this technically means that anyone can craft an online dataset of custom times and have it accessible with this library. If you do, I'd love to hear about it.
The tool uses the click library, so passing –help everywhere should give some guidance on usage. Hint: you have to init first.
Honestly, I don’t expect many to use this and so documentation is a little… lacking. As with all great programmers, I believe the tool to make sense out of the box. You can drop me a line if you get stuck - eventually that will form the documentation.
In short, because they won't output London Unified Prayer Times.
Most prayer time libraries (Python or otherwise), either directly use the amazing work of Hamid Zarrabi-Zadeh presented at http://praytimes.org/calculation or indirectly by wrapping https://aladhan.com/. On the other hand, ELM produces a curated timetable for the whole of the London region, that, unfortunately, can not be calculated (for more info, see: https://www.eastlondonmosque.org.uk/prayer-times-and-calendar-explained).
While arguably more correct (since they use your precise location as an input), the libraries relying on calculation will not match up with the ELM dataset. The ELM timetable is shared by The London Central Mosque, and so has the mindshare of many mosques across London. So if you want your application to likely match the timetable of your local London mosque, this this library may be for you.
Most of the existing PyPi libraries also choose to wrap https://aladhan.com/, which means they require an online connection to operate (which although convenient seems a bit convoluted for a calculation that could easily be performed locally). The aim of this library is to be able to operate offline as much as possible, by maintaining a local store of prayer times.
There are a few reasons:
Although not my first choice of language, this library has primarily been written for use with Home Assistant, which itself is written in Python. Since this library doesn't actually do that much, it made sense to keep it as native as possible.
Please excuse the anti-Python patterns - PRs are welcome. Although please, no comments on the lack of classes, that bit’s deliberate.
Of course! But please be aware that I will not be responsible for you missing Fajr.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.