AccuWeather
A python library to interact with the accuweather api.
General information
The functionality that makes this package unique is the integration of the
location client within the weather client. Specifying location by city name
(and country optionally) is a more user-friendly way to interact with the api.
Before you start
You need to create an api token on the AccuWeather website
(https://developer.accuweather.com).
How to use the package
""""Some code to show the functionality of the package"""
from accuweather_client.clients import WeatherClient
from constants import API_KEY
weather = WeatherClient(token=API_KEY, city="sydney")
weather.location
weather = WeatherClient(token=API_KEY, city="sydney", country="canada")
weather.location
weather = WeatherClient(token=API_KEY, poi="Eiffel tower")
weather.location
weather = WeatherClient(token=API_KEY, lat=51.988, lon=-4.88)
weather.location
forecast = weather.get_5day_forecast()
forecast.forecast_tomorrow
forecast_df = forecast.to_pandas_df()
forecast_hourly = weather.get_hourly_forecast_12h()
conditions = weather.get_current_conditions()
conditions.current_conditions