The official MAWAQIT Python wrapper.
Project description
MAWAQIT Python Library
السلام عليكم ورحمة الله وبركاته
Official async Python client for the MAWAQIT API — fetch mosque information and prayer times.
Getting an API token
- Create a free account on mawaqit.net.
- The client logs in with your email and password and obtains an API token for you (
get_api_token()). - Already have a token? Pass it directly with
token=...and skip the login.
Installation
pip install mawaqit
Usage
import asyncio
from mawaqit import AsyncMawaqitClient
async def main():
client = AsyncMawaqitClient(
username=USERNAME, password=PASSWORD, latitude=LATITUDE, longitude=LONGITUDE
)
await client.get_api_token()
# Find mosques near the coordinates, then pick one:
mosques = await client.all_mosques_neighborhood()
client.mosque = mosques[0]["uuid"]
# Or search by keyword: await client.fetch_mosques_by_keyword("paris")
print(await client.fetch_prayer_times())
await client.close()
asyncio.run(main())
Full example: examples/async_example.py.
Exceptions
All inherit from MawaqitException:
BadCredentialsException— wrong login credentials.MissingCredentials— required credentials not provided.NoMosqueAround— no mosque near the given location.NoMosqueFound— no mosque matches the keyword.NotFoundException— resource not found.
Contributing
Fork the repo and open a pull request, or open an issue.
pip install -r requirements-test.txt # dev dependencies
ruff check . && ruff format --check . # lint + format
mypy # type check
pytest # tests (must stay at 100% coverage)
pytest tests/test_client.py::test_keyword_success --no-cov # a single test
Enable the pre-push hook to run lint, type checks, and tests before each push:
git config core.hooksPath .githooks
HTTP is tested with an injected fake session (see tests/test_client.py), not by mocking aiohttp — follow that pattern for new tests.
License
Released under the license in the LICENSE file.
Questions
Reach us at support@mawaqit.net. May Allah reward you!
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-1.0.13.tar.gz.
File metadata
- Download URL: mawaqit-1.0.13.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b40e351123c5e7eff1efa60d6a3bbd18b2ede2d18c61e87595318a725b80ddf3
|
|
| MD5 |
d4d969c37bdc140b59257ba03d814eaa
|
|
| BLAKE2b-256 |
1ccabc6c18d116eb2d45bc0761028e457c51f523aee28b958943c9139d1b68b9
|
Provenance
The following attestation bundles were made for mawaqit-1.0.13.tar.gz:
Publisher:
python-publish.yml on mawaqit/mawaqit-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mawaqit-1.0.13.tar.gz -
Subject digest:
b40e351123c5e7eff1efa60d6a3bbd18b2ede2d18c61e87595318a725b80ddf3 - Sigstore transparency entry: 2026217458
- Sigstore integration time:
-
Permalink:
mawaqit/mawaqit-py@c38c8244d5c216b2b9e0214fcb357e8f1643c8c3 -
Branch / Tag:
refs/tags/1.0.13 - Owner: https://github.com/mawaqit
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c38c8244d5c216b2b9e0214fcb357e8f1643c8c3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mawaqit-1.0.13-py3-none-any.whl.
File metadata
- Download URL: mawaqit-1.0.13-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5865d5b34f6a9ffc7525ba85bd3db355e09c0959e7efeea58b0e90b0b8c3b64
|
|
| MD5 |
e0ac77382e69b46156f98911c2c3f3bc
|
|
| BLAKE2b-256 |
50e75d5389fe958dfd0b5e91ad80e71d61ea7939ff402487c35c49d9cc25096d
|
Provenance
The following attestation bundles were made for mawaqit-1.0.13-py3-none-any.whl:
Publisher:
python-publish.yml on mawaqit/mawaqit-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mawaqit-1.0.13-py3-none-any.whl -
Subject digest:
d5865d5b34f6a9ffc7525ba85bd3db355e09c0959e7efeea58b0e90b0b8c3b64 - Sigstore transparency entry: 2026217619
- Sigstore integration time:
-
Permalink:
mawaqit/mawaqit-py@c38c8244d5c216b2b9e0214fcb357e8f1643c8c3 -
Branch / Tag:
refs/tags/1.0.13 - Owner: https://github.com/mawaqit
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c38c8244d5c216b2b9e0214fcb357e8f1643c8c3 -
Trigger Event:
release
-
Statement type: