WeatherApp is a Python program in development meant to display weather data for a desired city/town in a certain country.
The program makes use of tkinter
and customtkinter
to build the GUI, OpenWeather API for the weather data, and model-view-controller for the code organization.
Python 3.12 was used for building this program.
An API Key from OpenWeather must be used for the acquisition of weather data. OpenWeather has tiered plans for use of their API depending on how many calls you make per minute and per month. Testing of this program has made use of their Free plan which provides 60 calls per minute and 1,000,000 calls per month. It provides the basics such as Current Weather and 3-hour step Forecast, over 5 days.
- Create an account on OpenWeather for free.
- Direct yourself to their
Pricing
page. Select your appropriate plan. - Copy the API Key. This key will also be visible by clicking on your username and selecting 'My API Keys' .
(Tip: DO NOT share this key or any similar API Keys with others, such as by uploading your key to online repositories).
- Add the API Key to a
.env
file. Make the first line in the fileAPIkey=#####
with the hashes representing your key.
-
Fork and clone the repository. You may also directly download the files in this repository.
-
Ensure that your
.env
file is set up in the same file location asmain.py
,model.py
,view.py
, andcontroller.py
. -
Run
main.py
in your IDE of choice OR open your command line (or equivalent), navigate to the directory, and runpython3.12 main.py
.