Client¶
stormlore.Client ¶
The wxchange API client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
Your API key. Default: the |
None
|
base_url
|
str | None
|
The API's address. Default: |
None
|
units
|
str | None
|
The default for |
None
|
timeout
|
float
|
Seconds to wait for each response. |
30.0
|
max_retries
|
int
|
How many times a failed request is retried (0 turns retries off). |
3
|
Raises:
| Type | Description |
|---|---|
MissingApiKeyError
|
No key was given and |
Attributes:
| Name | Type | Description |
|---|---|---|
forecast |
Models and forecast queries. |
|
tiles |
PNG data tiles. |
|
observations |
Point observations, stations and area observations. |
|
storm_reports |
Storm reports and their county rollups. |
|
radar |
MRMS radar frames at a point. |
|
scores |
Model verification: the Shyft Score, history, regions, ranking, badges, scorecard. |
|
advisories |
Active watches, warnings and advisories, by ZIP code or point. |
|
zips |
What ZIP codes cover (state, NWS zones, SAME codes). |
Example
with Client() as client:
now = client.forecast.point("gfs", (41.26, -95.94), "temperature_2m")
stormlore.AsyncClient ¶
The wxchange API client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
Your API key. Default: the |
None
|
base_url
|
str | None
|
The API's address. Default: |
None
|
units
|
str | None
|
The default for |
None
|
timeout
|
float
|
Seconds to wait for each response. |
30.0
|
max_retries
|
int
|
How many times a failed request is retried (0 turns retries off). |
3
|
Raises:
| Type | Description |
|---|---|
MissingApiKeyError
|
No key was given and |
Attributes:
| Name | Type | Description |
|---|---|---|
forecast |
Models and forecast queries. |
|
tiles |
PNG data tiles. |
|
observations |
Point observations, stations and area observations. |
|
storm_reports |
Storm reports and their county rollups. |
|
radar |
MRMS radar frames at a point. |
|
scores |
Model verification: the Shyft Score, history, regions, ranking, badges, scorecard. |
|
advisories |
Active watches, warnings and advisories, by ZIP code or point. |
|
zips |
What ZIP codes cover (state, NWS zones, SAME codes). |
Example
async with AsyncClient() as client:
now = await client.forecast.point("gfs", (41.26, -95.94), "temperature_2m")