Asynchronous Python client for the GeoSphere Austria Warn API
Project description
pygeosphere-warnings
Asynchronous Python client for the GeoSphere Austria Warn API, which provides the official GeoSphere Austria weather warnings for all municipalities in Austria.
Usage
import asyncio
import aiohttp
from pygeosphere_warnings import GeoSphereWarningsClient
async def main() -> None:
async with aiohttp.ClientSession() as session:
client = GeoSphereWarningsClient(session)
# Cheap HEAD precheck: timestamp of the latest warning update
last_modified = await client.get_last_modified()
print(f"Warnings last updated: {last_modified}")
# Warnings for the municipality at the given coordinates
warnings = await client.get_warnings_for_coords(48.2486, 16.3564, "en")
print(f"Municipality: {warnings.municipality.name}")
for warning in warnings.warnings:
print(f"- {warning.warning_type.name} ({warning.level.name}): {warning.text}")
# Automated thunderstorm warnings (municipality id -> intensity)
thunderstorms = await client.get_thunderstorms()
print(thunderstorms.get(warnings.municipality.municipality_id))
asyncio.run(main())
License
MIT. Warning data: © GeoSphere Austria, CC BY 4.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygeosphere_warnings-0.1.0.tar.gz.
File metadata
- Download URL: pygeosphere_warnings-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12fc9593ec81c315d239c2f4c4715c89636c27cf49e167343c81ca39aa49d149
|
|
| MD5 |
17d3a467392044502a817218bcb18d6f
|
|
| BLAKE2b-256 |
ddfb6720e0462d2888bdedb97ef3b3ec934f21c8b645da64c11fdfee07e39432
|
Provenance
The following attestation bundles were made for pygeosphere_warnings-0.1.0.tar.gz:
Publisher:
release.yml on tklecka/pygeosphere-warnings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygeosphere_warnings-0.1.0.tar.gz -
Subject digest:
12fc9593ec81c315d239c2f4c4715c89636c27cf49e167343c81ca39aa49d149 - Sigstore transparency entry: 1791880215
- Sigstore integration time:
-
Permalink:
tklecka/pygeosphere-warnings@61fa7cbb5bccb6c66c57251771096fbd85d20325 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tklecka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61fa7cbb5bccb6c66c57251771096fbd85d20325 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pygeosphere_warnings-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pygeosphere_warnings-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
430a398fd2ed03787099f64df7f61452355d3ae9940523a79affafd5e5dbc190
|
|
| MD5 |
7cf0f2818e046919a11277af3c8c74d0
|
|
| BLAKE2b-256 |
b0cd27fac86c166f3e3617fd0b8dc6da8bd05ffaa5ceed5d421f62f11bdaabd2
|
Provenance
The following attestation bundles were made for pygeosphere_warnings-0.1.0-py3-none-any.whl:
Publisher:
release.yml on tklecka/pygeosphere-warnings
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygeosphere_warnings-0.1.0-py3-none-any.whl -
Subject digest:
430a398fd2ed03787099f64df7f61452355d3ae9940523a79affafd5e5dbc190 - Sigstore transparency entry: 1791880253
- Sigstore integration time:
-
Permalink:
tklecka/pygeosphere-warnings@61fa7cbb5bccb6c66c57251771096fbd85d20325 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tklecka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61fa7cbb5bccb6c66c57251771096fbd85d20325 -
Trigger Event:
release
-
Statement type: