Created
February 6, 2019 03:25
-
-
Save saulcosta/2884d0222b38f073b622d53c5e1d323e to your computer and use it in GitHub Desktop.
PyOWM example 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyowm | |
owm = pyowm.OWM('<api_key>') # TODO: Replace <api_key> with your API key | |
boston = owm.weather_at_place('Boston, US') | |
weather = boston.get_weather() | |
print(weather.get_sunrise_time(timeformat='iso')) # Prints time in GMT timezone | |
print(weather.get_sunset_time(timeformat='iso')) # Prints time in GMT timezone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment