from pprint import pprint
import json
import pogoda

with open("pogoda.json", "r") as file:
    data = json.load(file)

city = input("City name:")

city_weather = None
for item in data['city_weather']:
    if item['city'] == city:
        city_weather = item
        break

if city_weather:
    print(f"\nWeather in w {city_weather['city']}:")
    print(f"Temperture: {city_weather['temperature']}C")
    print(f"Humidity: {city_weather['humidity']}%")
    print(f"Current Weather: {city_weather['weather']}")
    print(f"The Speed of wind {city_weather['wind_speed']} km/h")
    print(f"Description: {city_weather['description']}:")
else:
    print("Couldn't find the City due to it *not* being on the list 😔")

