Closed csparpa closed 8 years ago
Usage:
uvi = owm.uvindex_around_coords(lat, lon) # Get current UV Index on these coordinates
uvi.get_value() # 4.2
uvi.get_exposure_risk() # 'moderate'
# Get available UV Index in the last 24 hours and last month
uvi = owm.uvindex_around_coords(lat, lon, start=timeutils.yesterday(), interval='day')
uvi = owm.uvindex_around_coords(lat, lon, start=timeutils.last_month(), interval='month')
# interval can be: minute, hour, day, month, year
The OpenWeatherMap API also provides UV indexes data for locations all over the world:
PyOWM should support this feature as well