Closed MusLead closed 5 months ago
as I tried to run this server and write http://127.0.0.1:8000/docs I see a documentation of using this api. that is great, but I do not know the mosque_id that is being used. How could we see the list of the mosque id?
The round way solution is to open the app and share the link of the mosque and open it in the browser. then the address will be shown i.e: https://mawaqit.net/en/m/dawah-kassel .Therefore the mosque_id is dawah-kassel
I stillhave difficulties to access them with docker... could please give us more explanation!
I got this error as I tried to build the docker
Dockerfile:3
--------------------
1 | FROM python:3.8.14-alpine3.16
2 | WORKDIR /app
3 | >>> COPY main.py models.py script.py requirements.txt /app/
4 | RUN pip install -r requirements.txt
5 | CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 8f02780c-4ec5-4b26-b150-ff744ad68274::m7r92hckz5oz364m1rchcfmbo: "/script.py": not found
(base)
Hello @MusLead, i can see that i forgot to edit the docker file, because i made some changes in the project structure, i will drop a fix on this soon, also i will create docker compose file to run both the api and the redis database for caching. Thank you
Resolved in #10 , fixed the bug in the dockerfile, and added a docker conpose file to run redis and mawaqit api together, also now redis is optional you can enable or disable it via env var.
I sincerely appreciate the swift response you provided earlier. I am writing to suggest an enhancement to the documentation related to identifying the mosque_id. It would be immensely beneficial for users if the documentation included a section on how to find the mosque_id (i.e. by opening the app, sharing the mosque's link, and then opening it in a browser to reveal the address, such as https://mawaqit.net/en/m/dawah-kassel, thereby identifying the mosque_id as dawah-kassel
.)
Furthermore, I believe it would be advantageous to incorporate a note within the documentation to inform users that accessing the service solely through IP addresses will not yield results. Instead, adding /docs to the URL will display a collection of paths for utilizing this REST-API, which is invaluable for individuals unfamiliar with FAST-API.
Additionally, guidance on accessing the REST-API through Docker, as it presents a slightly different approach compared to local Python environments, would greatly enhance the documentation. While the inclusion of Redis and other technologies is appreciated, a clearer explanation of their (Redis) functions and how they can be utilized within this context would be very helpful.
Your contributions to developing this REST-API have been truly remarkable, providing an essential resource for those looking to develop applications based on the Mawaqit database. I extend my gratitude for your innovative efforts and kindly ask you to consider these suggestions to further improve the documentation and user experience.
Thank you once again for your dedication and hard work.
Hello @MusLead, thanks for this wonderful feedback, i'm planning to create a full documentation on how to use this API.
is this offical API from Mawaqit?
Hi @highwingers, No this is not an official API from Mawaqit, this api use Mawaqit.net website to get the prayer times in json.
Hello @MusLead, a clear documentation is now available here https://mrsofiane.me/mawaqit-api/#/, documentation is generated with docsify, you can check the /docs folder.
I tried to run using
But as you see, it returns 404 not found.
could you also give us some more explanation on how to use this uvicorn for this purpose?