Skip to main content

pygeosphere-warnings

PyPI CI License: MIT

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygeosphere_warnings-0.1.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygeosphere_warnings-0.1.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file pygeosphere_warnings-0.1.2.tar.gz.

File metadata

  • Download URL: pygeosphere_warnings-0.1.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pygeosphere_warnings-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a495dcf37e05616cccacf5c4e2a5baead9443057d2b42a2ed246287ca9d3e690
MD5 87ba446faa7916655c364eb70c497dd2
BLAKE2b-256 3c9959834c8867ceebbb67e01c64a15da0089881cb55f352694cf4ead599b570

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygeosphere_warnings-0.1.2.tar.gz:

Publisher: release.yml on tklecka/pygeosphere-warnings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygeosphere_warnings-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pygeosphere_warnings-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43b111554e4c56fddc7da10e0dc2473f1c77edcd42b84a70ce91194addaa56f3
MD5 2b1caa797ffe552c7e6e07ccd48cb375
BLAKE2b-256 3bc63e87410b950991b3fc263073e3e9a266891e4d52b3c61437229dadf8da5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygeosphere_warnings-0.1.2-py3-none-any.whl:

Publisher: release.yml on tklecka/pygeosphere-warnings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page