https://github.com/polespurnes/pythonweather
Python project that shows the actual weather of any chosen city in a PyQt5 GUI using OpenWeather API.
https://github.com/polespurnes/pythonweather
api gui pyqt5 python requests weather-app
Last synced: 21 days ago
JSON representation
Python project that shows the actual weather of any chosen city in a PyQt5 GUI using OpenWeather API.
- Host: GitHub
- URL: https://github.com/polespurnes/pythonweather
- Owner: PolEspurnes
- Created: 2020-08-27T14:49:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-29T08:27:32.000Z (almost 6 years ago)
- Last Synced: 2025-03-02T21:31:27.365Z (over 1 year ago)
- Topics: api, gui, pyqt5, python, requests, weather-app
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PythonWeather
This is a project created with Python that shows the actual weather of any chosen city in a **PyQt5** GUI.
The [OpenWeather API](https://openweathermap.org/api) has been used to request all the data.
### Setup
For the program to work, two local files are needed:
1. **APIkey** -- Contains your API key, given by the OpenWeather API when you [register](https://home.openweathermap.org/users/sign_up).
Just copy and paste the key inside this file.
2. **city.list.json** -- This file contains all the information related to the cities covered by the API. It can be downloaded [here](http://bulk.openweathermap.org/sample/city.list.json.gz).
These two files are read in the **WetaherAPI.py** init function.
```
key_filename = "APIkey"
city_filename = "city.list.json"
```
### Example
After setup is done, run **main.py**.
1. First you will be asked for a city.

2. If the city is found inside the API city list, results will be shown, unless the city's name is repeated.
In that case, a new screen will appear and you will have to select the country.

If the city is not found, an error window will be prompted.

3. Once the city has been chosen, the results window will appear and show the actual weather conditions, temperature and minimum and maximum temperatures of the day.
