+ weather header

This commit is contained in:
Nico Schottelius 2019-06-06 16:15:04 +02:00
parent 8c02790666
commit 307446e596

View file

@ -23,6 +23,7 @@ class ungleichWeather(object):
def forecast_weather(args):
_city, _country_code = get_loc()
print("Weather for {}\n".format(_city))
client = ApixuClient("cc33a1e3237a4b78b3174104190206")
@ -30,4 +31,4 @@ class ungleichWeather(object):
print(f"{'Date':^12}|{'Min Temp':^10}|{'Max Temp':^10}|{'Condition':^15}")
print(f"{'*'*47:^47}")
for day in forecast['forecast']['forecastday']:
print(f"{day['date']:^12}|{day['day']['mintemp_c']:^10}|{day['day']['maxtemp_c']:^10}|{day['day']['condition']['text']:^15}")
print(f"{day['date']:^12}|{day['day']['mintemp_c']:^10}|{day['day']['maxtemp_c']:^10}|{day['day']['condition']['text']:^15}")