1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
# Simple Forecast
_This example gets a 5 day forecast for your location and prints out
some values from each timestep for each day._
### Required Modules
* [datapoint](https://github.com/perseudonymous/datapoint-python)
## Learning Objective
Explore the day and timestep objects and loop through them.
## Example Usage
```Shell
python simple_forecast.py
```
## Example Output
```
London
2014-10-18Z
180
Partly cloudy (night)
17°C
360
Cloudy
18°C
540
Light rain shower (day)
18°C
720
Light rain
18°C
900
Cloudy
19°C
1080
Cloudy
18°C
1260
Cloudy
18°C
2014-10-19Z
0
Cloudy
18°C
180
Light rain
17°C
360
Heavy rain
17°C
540
Cloudy
17°C
720
Cloudy
18°C
900
Partly cloudy (day)
18°C
1080
Partly cloudy (night)
17°C
1260
Overcast
15°C
2014-10-20Z
0
Overcast
14°C
180
Light rain shower (night)
14°C
360
Partly cloudy (night)
13°C
540
Partly cloudy (day)
13°C
720
Cloudy
15°C
900
Cloudy
15°C
1080
Cloudy
14°C
1260
Cloudy
13°C
2014-10-21Z
0
Cloudy
13°C
180
Light rain shower (night)
13°C
360
Light rain shower (night)
14°C
540
Light rain shower (day)
13°C
720
Light rain shower (day)
13°C
900
Sunny day
13°C
1080
Clear night
12°C
1260
Partly cloudy (night)
10°C
2014-10-22Z
0
Clear night
10°C
180
Clear night
9°C
360
Partly cloudy (night)
9°C
540
Cloudy
10°C
720
Cloudy
13°C
900
Cloudy
15°C
1080
Overcast
14°C
1260
Overcast
13°C
```
|