WeatherToolkit
init
- timeout (Optional[float]): The timeout value for API requests in seconds. If None, no timeout is applied. (default: :obj:
None
)
get_openweathermap_api_key
get_weather_data
- city (str): The name of the city for which the weather information is desired. Format “City, CountryCode” (e.g., “Paris, FR” for Paris, France). If the country code is not provided, the API will search for the city in all countries, which may yield incorrect results if multiple cities with the same name exist.
- temp_units (
Literal['kelvin', 'celsius', 'fahrenheit']
): Units for temperature. (default: :obj:kelvin
) wind_units (Literal[‘meters_sec’, ‘miles_hour’, ‘knots’, ‘beaufort’]): Units for wind speed. (default: :obj:meters_sec
) - visibility_units (
Literal['meters', 'miles']
): Units for visibility distance. (default: :obj:meters
) - time_units (
Literal['unix', 'iso', 'date']
): Format for sunrise and sunset times. (default: :obj:unix
)