Skip to main content

Prayer Times Calculator - Offline

Not designed as a general purpose prayer time library. This is meant as a cloud-free, drop-in replacement for prayer-times-calculator, which in turn is used by the Islamic Prayer Times HomeAssistant integration.

Equivalence to the prayer-times-calculator library was checked by emperical comparison of 50,000 requests (each with randomized parameters). The original intention was to replicate the output exactly, however please note the following exceptions where prayer-times-calculator-offline will return a different result than prayer-times-calculator for the same call:

  • Asr calculation is stable; at time of writing, AlAdhan's API uses the API server's local time as part of the Asr calculation, causing the returned time to drift as the server's day progresses.
  • ISO8601 date components are correct; at time of writing, AlAdhan's API sometime returns ISO8601 timestamps with correct times but incorrect dates.
    • E.g. this API call where all timestamps are returned with the same date component, making Isha appear to happen before Maghrib and Fajr appear to happen after Sunrise
  • Portugal Maghrib tuning applied correctly; At time of writing, AlAdhan's API maps the Asr tuning value to Maghrib. Since fixed in API
  • Local time output (iso8601=False) is not supported, as it is not required for use in HomeAssistant (which deals only with UTC internally)
  • 'None' is supported as a high-latitude adjustment method
  • Angles of 0 are supported for the "custom" calculation method; at time of writing, AlAdhan's API silently ignores such angles and uses a different default angle in their place.
  • Floating point & trig operations take place on your machine, and may vary slightly from the AlAdhan API server's implementations; there may be 1-minute differences if these computational variations span a rounding break. Hijri date calculation may also be affected, including the 30-minute Isha offset during Ramadan when using the Makkah calculation method.

Usage

Please refer to the usage section of prayer-times-calculator.

Metadata

Release files for prayer-times-calculator-offline 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prayer-times-calculator-offline 1.0.3
File Size Uploaded
prayer_times_calculator_offline-1.0.3.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prayer-times-calculator-offline 1.0.3
File Interpreter ABI Platform
prayer_times_calculator_offline-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 27.0 kB

Release files / prayer_times_calculator_offline-1.0.3.tar.gz

Download URL prayer_times_calculator_offline-1.0.3.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be6cb5858657b83bdd8e304de588afccffa57307c4f3a67db680738fe9328f5e
BLAKE2b-256 checksum
How to use checksums
d4c688c48725e3603f8e6eb95935eca17b857a131bb7dd72b2f4d49538015cb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / prayer_times_calculator_offline-1.0.3-py3-none-any.whl

Download URL prayer_times_calculator_offline-1.0.3-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13f1b2d6369a83eddbaa376f6e2a8e13035f5a96513e4a5b90b6f05ac0dfa730
BLAKE2b-256 checksum
How to use checksums
feb6f0f4724610dd45deb1bbf9dceea53d77ee121de36b51d5bd032cffd95c2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page