Project "MyWeather" is a small practical task in Python using the geopy library. The task is to learn the API, trying the geopy functionality and data type in python language. The program collects information about the weather in the city using the API from OpenWeatherMap.
Displayed five types of data: City, temperature, weather, latitude and longitude.
Latitude and Longitude getting with geopy by simply having city name. They also needed as output for the OpenWeatherMap API to find information about the city at these coordinates.
Проект "MyWeather" представляет собой небольшое практическое задание на языке Python с использованием библиотеки geopy. Задача в том, чтобы научиться использовать API, опробовать функционал geopy и типизацию данных в языке. Программа собирает и обрабатывает информацию о погоде в городе с помощью API от OpenWeatherMap.
Отображаются пять типов данных: Город, температура, состояние погоды, ширина и долгота.
Ширина и долгота получаются с помощью geopy, имея просто название города. Они так же нужны как выходные данные для OpenWeatherMap API, чтобы найти информацию о городе по этим координатам.
Project created with:
-
Unpack anywhere you want.
-
Install Python 3.10.
-
For automatically start, use 'Weather.bat'.
-
For manually start, use Command Line or PowerShell in project directory. After, type:
python -m pip install -r requirements.txt
- That command will install or update dependencies.
Run:
python weather.py
- This will launch the program.
This method tested only on Windows 10. Its may different in other systems.
- Use that three commands:
$ git clone https://github.com/Zeerck/MyWeather
$ pip install -r requirements.txt
$ python3 weather.py- Enjoy.
If you live in Russia, please using VPN. OpenWeatherMap API may don't work in that country.
Used Python documentation, geopy documentation, OpenWeatherMap documentation and etc.
The author is not a professional in Python programming. There may gross errors in logic, naming violations and other unpleasant things.

