31 lines
1 KiB
Python
31 lines
1 KiB
Python
|
|
import pprint
|
|
|
|
weatherData = {'coord': {'lon': -72.5949, 'lat': 42.1726},
|
|
'weather': [{'id': 801, 'main': 'Clouds', 'description': 'few clouds', 'icon': '02n'}],
|
|
'base': 'stations',
|
|
'main': {'temp': 285.11, 'feels_like': 283.25, 'temp_min': 282.18, 'temp_max': 286.21,
|
|
'pressure': 1015, 'humidity': 34},
|
|
'visibility': 10000,
|
|
'wind': {'speed': 3.6, 'deg': 160},
|
|
'clouds': {'all': 20},
|
|
'dt': 1649723543,
|
|
'sys': {'type': 1, 'id': 3598, 'country': 'US', 'sunrise': 1649672158,
|
|
'sunset': 1649719584},
|
|
'timezone': -14400,
|
|
'id': 4933002,
|
|
'name': 'Chicopee',
|
|
'cod': 200}
|
|
|
|
#pp = pprint.PrettyPrinter(indent=4)
|
|
|
|
#pp.pprint(weatherData)
|
|
|
|
#print("\n")
|
|
|
|
print("coord",weatherData['coord'])
|
|
print("weather: ",weatherData['weather'])
|
|
print("base: ",weatherData['base'])
|
|
print("main: ",weatherData['main'])
|
|
print("wind: ",weatherData['wind'])
|
|
|