Skip to content

Commit

Permalink
Merge f2cb318 into e35446e
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankuraxz committed Jul 25, 2020
2 parents e35446e + f2cb318 commit ac0758d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Observations_around_coords.py
@@ -0,0 +1,18 @@
from pyowm import OWM
key = "<Your Free Weather2.5+ One Call Api key here>"
owm = OWM(key)
mgr = owm.weather_manager()


observation_list = mgr.weather_around_coords(lat,lon) #latitude, longitude
#print(observation_list)
for ix in range (len(observation_list)):
observation = observation_list[ix]
w = observation.weather
print(w) # <Weather - reference time=2013-12-18 09:20, status=Clouds>

# Weather details

print(w.wind()) # {'speed': 4.6, 'deg': 330}
print(w.humidity) # 87
print(w.temperature('celsius')) # {'temp_max': 10.5, 'temp': 9.7, 'temp_min': 9.0}

0 comments on commit ac0758d

Please sign in to comment.