Weather
Accessed via sdk.weather on an AspiaSpace instance.
Service wrapper for the Weather endpoints.
Source code in src/aspiaspace/services/weather.py
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 | |
point(coord, start, end, resolution=5)
Retrieve weather for a single point and date range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coord
|
str
|
Coordinate as (lon,lat) |
required |
start
|
str
|
Start of date range. |
required |
end
|
str
|
End of date range. |
required |
resolution
|
int
|
Resolution of weather model. Defaults to 5. |
5
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If coordinate is invalid. |
ValueError
|
If resolution is not one of the allowed sizes (1 or 5, depending on subscription). |
ValueError
|
If start or end date is missing. |
ValueError
|
If start date is not in YYYY-MM-DD format. |
ValueError
|
If end date is not in YYYY-MM-DD format. |
Returns:
| Type | Description |
|---|---|
|
Weather data (json): API response |
Source code in src/aspiaspace/services/weather.py
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 | |