Browse Source

+ weather header

master
Nico Schottelius 4 years ago
parent
commit
307446e596
  1. 3
      ungleich_weather.py

3
ungleich_weather.py

@ -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}")

Loading…
Cancel
Save