Exemple #1
0
 def get_weather(self):
     # https://openweathermap.org
     weather = Weather(
         apikey=os.getenv("OPENWEATHERMAP"),
         lat=self.latitude,
         lon=self.longitude,
     )
     return weather.next_12h_simplified()
Exemple #2
0
 def get_weather(self):
     """
     Weather class need apikey from https://openweathermap.org.
     """
     weather = Weather(apikey="26631f0f41b95fb9f5ac0df9a8f43c92",
                       lat=self.latitude,
                       lon=self.longitude)
     return weather.next_12h_simplified()
Exemple #3
0
 def __init__(self, weather: Weather):
     self.weather = weather
     self.prettified = [{
         'dt':
         datetime.strptime(forecast['dt_txt'], self.__DT_FORMAT),
         'temp':
         forecast['main']['temp'],
         'desc':
         forecast['weather'][0]['description'],
         'icon':
         forecast['weather'][0]['icon']
     } for forecast in weather.next_12h()]
Exemple #4
0
 def get_weather(self):
     weather = Weather(apikey="26631f0f41b95fb9f5ac0df9a8f43c92",
                       lat=self.latitude,
                       lon=self.longitude)
     return weather.next_12h_simplified()
 def get_weather(self):
     weather = Weather(apikey="f6f970013f0f39ea27a183b04c0bd0ba",
                       lat=self.latitude,
                       lon=self.longitude)
     return weather.next_12h_simplified()  # Make sure internet is connected
Exemple #6
0
 def get_weather(self):
     weather = Weather(apikey="INSERT YOUR API KEY HERE",
                       lat=self.latitude,
                       lon=self.longitude)
     return weather.next_12h_simplified()
Exemple #7
0
 def get_weather(self):
     weather = Weather(api_key, lat=self.latitude, lon=self.longitude)
     return weather.next_12h_simplified()
Exemple #8
0
 def get_weather(self) -> list:
     weather = Weather(apikey=self.__API_KEY,
                       lat=self.latitude,
                       lon=self.longitude)
     return ForecastPrettifier(weather).prettified
Exemple #9
0
 def get_weather(self):
     weather = Weather(apikey="6b1bc321cb07b1ef9b875a79248a6484", \
                       lon=self.longitude, lat=self.latitude)
     return weather.next_12h_simplified()