Skip to main content

meteoalarmapi

PyPI

An unofficial Python wrapper for MeteoAlarm.org (European weather alerts), which can be used to check whether a given province in your country currently has a weather alert.

This is a maintained fork of meteoalertapi by Rolf Berkenbosch, which has had no releases since February 2024. It keeps the same Meteoalert class and alert fields. See What changed from meteoalertapi.

Installation

pip install meteoalarmapi

Code example

from meteoalarmapi import Meteoalert

# Find your country and province on https://meteoalarm.org/ or https://feeds.meteoalarm.org/
# The province can be its name (matched as a regular expression) or its EMMA_ID code.
meteo = Meteoalert('united-kingdom', 'Highlands & Eilean Siar')

# The most severe current alert, or {} when there is none
print(meteo.get_alert())

# Every alert for the province, most severe first
for alert in meteo.get_alerts():
    print(alert['event'], alert['severity'], alert['onset'], alert['expires'])

Each alert also has the CAP message fields identifier, message_type (Alert, Update or Cancel), references and sent, so you can follow a warning across updates and tell when one is cancelled.

Some feeds keep warnings for a while after they end. Pass include_expired=False to leave expired alerts out. Future alerts, which haven't started yet, are kept:

for alert in meteo.get_alerts(include_expired=False):
    print(alert['event'], alert['onset'], alert['expires'])

Alerts are ranked with current ones first, then by awareness level (awareness_level, e.g. 3; Orange; Severe), then by CAP severity. Alerts that rank equally keep their order in the feed.

What changed from meteoalertapi

  • The package is now imported as meteoalarmapi instead of meteoalertapi.
  • get_alert() returns the most severe current alert. Before, it returned the first match in the feed, so a yellow warning could hide an amber one.
  • New get_alerts() returns every matching alert, most severe first.
  • get_alerts(include_expired=False) leaves out expired alerts, which some feeds keep for a while. Future alerts are kept.
  • awareness_level, awareness_type and the other CAP parameters are now included for feeds with a single language, such as the UK's. Before, they were silently dropped.
  • An alert listed several times in the feed (once per language or area) is returned and fetched only once.
  • Each alert includes the CAP identifier, message_type, references and sent.
  • Python 3.10 or newer is required.

Changelog

See the CHANGELOG file.

License

MIT. Original work copyright (c) 2018 Rolf Berkenbosch.

Metadata

Release files for meteoalarmapi 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meteoalarmapi 0.4.0
File Size Uploaded Provenance Actions
meteoalarmapi-0.4.0.tar.gz 48.1 kB With provenance Details for meteoalarmapi-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for meteoalarmapi 0.4.0
File Interpreter ABI Platform Actions
meteoalarmapi-0.4.0-py3-none-any.whl Python 3 none any Details for meteoalarmapi-0.4.0-py3-none-any.whl

Total release size: 54.2 kB

Release files / meteoalarmapi-0.4.0.tar.gz

Download URL meteoalarmapi-0.4.0.tar.gz
Size 48.1 kB
Tags Source
SHA-256 checksum
How to use checksums
783ec445ee1a3a514713ebee0eb0d716744237c5602e4d651a6a2a60c10ecc2d
BLAKE2b-256 checksum
How to use checksums
b177870ef0b04a489a72cd01eb080e62932ff2312f8f54d2bb781bad352dc713
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / meteoalarmapi-0.4.0-py3-none-any.whl

Download URL meteoalarmapi-0.4.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4314e6908be8b568c828890d67930b9a89ce050ff8054ba72d77424dcf963c1
BLAKE2b-256 checksum
How to use checksums
f4dc32e6c7d0dd2833c44400f57820aeab3d25f87371d1ad0d268f40b7e0faa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for meteoalarmapi 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for meteoalarmapi-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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