Made for ycloud.school
Test exercise with weather forecast with advices (third level).
Using Python, Aiohttp, and html page as UI.
- wttr.in API for weather forecast. More info here...
- bootstrap for frontend part.
First of all, install Python3 (version 3.8 or above).
Then clone this repository or download it in archive.
After it install requirements with your terminal and pip command:
pip install -r requirements.txt
For running script type in your terminal
python server.py
- User enter town (or country, or other place, or coordinates, etc) and press button.
- Sends get query via ajax to server
- Server making 2 get queries to wttr:
- json response analyzing for advices
- html response using for forecast visualization
- Then results merges to html response
- Page getting response and put it in div block
That's it.
P.S. If we have problem with get query we can see error message instead forecast visualization.
Video you can watch here, but if it'll be not available - you can download it from media folder.