- This simple but powerful app asks the user to click a
GUI button
then click anotherRUN
button then it displays the current weather conditions of the city. - Good to note, the openweathermap API supports a time-delay of
10 mins
before they can refresh their servers to update the user of the weather data requessted for.
The following are the basic requirements to fully achieve the aim of this project
-
You'll first of all need to sign up for a free account with Openweathermap to get a FREE API to request for the near-real time weather data.
-
This should take less than 2 hours to receive your API
-
Once in the main project directory, run
pip install -r requirements.txt
command.This will enable your pythonpip/pip3
to read through therequirements.txt
file in this folder and installs the python libraries needed for this project. -
Then, go to the
url = "https://api.openweathermap...
line and paste your API key there towards the end of that line as indicated, just before.format()
. -
Once it is through without any errors, run
python main.py
orpython3 main.py
depending on the python versin you're using. -
upon running the code, you'll see an image like the one labelled
selectCity.png
- Will fix the image bug later
-
Click the
select the city
button, from the drop down , you'll see cities to view their weather and clickRUN
button. -
You'll see and image like the one labeled
results.png
Although I have taken every care to ensure the accuracy my our content, mistakes do happen. If you find a mistake in this project—maybe a mistake in the text or the code—I would be grateful if you could report this to me via mail or via visiting my official website. By doing so, you can save others from frustration and help me improve subsequent versions of this mini-project and related works.
One of the greatest benefits of python is its great kind and helpful user community. For help with any aspect of related to python - from installation, to application design, to to deployment - feel free to ask questions online.