project/services/weather.py
def fetch_forecast_7_days(self, location: str,
                              unit: str) -> [Dict[str, str]]:
        """Fetches the forecast for the next seven days from openweathermap.org

        :param location: The name of the location this
        :param unit: Defines the units for the temperature. Only accepts
                    'celsius', 'fahrenheit', 'kelvin' and 'random'.
        """

        forecasts = self.owm.daily_forecast(location).get_forecast()

        if forecasts is None:
            msg = f"There is no weather data for this location={location}"
            raise AttributeError(msg)

        forecast_dicts = [format_forecast(f, unit) for f in forecasts]
        return forecast_dicts
Fetches the forecast for the next seven days from openweathermap.org

        :param location: The name of the location this
        :param unit: Defines the units for the temperature. Only accepts
                    'celsius', 'fahrenheit', 'kelvin' and 'random'.
        
Fetches the forecast for the next seven days from openweathermap.org
Fetches the forecast for the next seven days from openweathermap . org
def fetch_forecast_7_days(self, location: str,
                              unit: str) -> [Dict[str, str]]:
        forecasts = self.owm.daily_forecast(location).get_forecast()
        if forecasts is None:
            msg = f"There is no weather data for this location={location}"
            raise AttributeError(msg)
        forecast_dicts = [format_forecast(f, unit) for f in forecasts]
        return forecast_dicts
def fetch_forecast_7_days ( self , location : str , unit : str ) -> [ Dict [ str , str ] ] : forecasts = self . owm . daily_forecast ( location ) . get_forecast ( ) if forecasts is None : msg = f"There is no weather data for this location={location}" raise AttributeError ( msg ) forecast_dicts = [ format_forecast ( f , unit ) for f in forecasts ] return forecast_dicts
Fetches the forecast for the next seven days from openweathermap.org
Fetches the forecast for the next seven days from openweathermap . org
"""Fetches the forecast for the next seven days from openweathermap.org

        :param location: The name of the location this
        :param unit: Defines the units for the temperature. Only accepts
                    'celsius', 'fahrenheit', 'kelvin' and 'random'.
        """
self
location
str
The name of the location this
The name of the location this
unit
str
Defines the units for the temperature. Only accepts
'celsius', 'fahrenheit', 'kelvin' and 'random'.
Defines the units for the temperature . Only accepts ' celsius ' ' fahrenheit ' ' kelvin ' and ' random ' .