A comprehensive Python library for astronomical calculations and prayer times.
Project description
Mawaqit-Astro
Mawaqit-Astro is a high-precision Python library for astronomical calculations and Islamic prayer times. It is a port of advanced astronomical logic, providing features for sun and moon positioning, sidereal time, and prayer time calculations based on various global standards.
Features
- Comprehensive Astronomical Data: Compute Sun, Moon, Polaris positions, Nutation, and more.
- Accurate Prayer Times: Default support for Islamic Scholar Ala Hazrat method, with full support for custom angles and minute-based offsets.
- Flexible Madhab Support: Shafi and Hanafi methods for Asr calculations.
- High Latitude Support: Robust rules for regions with extreme day/night cycles.
- Pure Python: No external dependencies required.
Installation
pip install mawaqit-astro
Quick Start
1. Calculate Prayer Times
from mawaqit_astro import PrayerCalculator, Location
# 1. Provide only required location data
location = Location(latitude=24.8607, longitude=67.0011, timezone=5.0)
# 2. Calculate using professional defaults
# (Current date, Ala Hazrat method, Hanafi Madhab)
times = PrayerCalculator().calculate(location)
print(f"Fajr: {times.fajr}")
print(f"Isha: {times.isha}")
2. High-Level Almanac Calculations
from mawaqit_astro.core.almanac import compute_almanac, InputData
# Advanced astronomical data for a specific moment
data = InputData(year=2025, month=12, day=24, hour=12, minute=0, second=0)
almanac = compute_almanac(data)
print(f"Sun Right Ascension: {almanac.sun.rightAscension}")
print(f"Moon Phase: {almanac.moon.phase}")
Project Structure
mawaqit-astro/
├── src/
│ └── mawaqit_astro/
│ ├── core/ # High-precision astronomy logic (Sun, Moon, Nutation, etc.)
│ ├── prayers/ # Prayer time calculation modules
│ ├── utils/ # Mathematical and date utilities
│ └── types.py # Common data structures
├── tests/ # Comprehensive test suite
├── pyproject.toml # Package configuration
└── README.md # Documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mawaqit_astro-1.0.2.tar.gz.
File metadata
- Download URL: mawaqit_astro-1.0.2.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f3170b047c05d1da8aebd7dc6bbb9a3cd823c75f60712fa0a167389f078ebe6
|
|
| MD5 |
49da08e464744321829284547c8fa861
|
|
| BLAKE2b-256 |
517a9f5103ac10714a47fa872373fbbe2365bfd8d71d09c8d918a5ac88f4b74a
|
File details
Details for the file mawaqit_astro-1.0.2-py3-none-any.whl.
File metadata
- Download URL: mawaqit_astro-1.0.2-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
802e36b7b696d8547e2dbd66a9862e084d66cfcc676b1022ae2f8bb9d7209fa1
|
|
| MD5 |
df4ae5b4de76e03a14da06e353092afc
|
|
| BLAKE2b-256 |
2de90079ec3efa656a4517d0a13e97fa39967c6e511c68b5bd1b96e88f4c54dc
|