Skip to main content

An "API" for meteoalarm.eu using the rss feeds.

Project description

GitHub tests GitHub issues by-label PyPI PyPI - Downloads

An API for meteoalarm.eu weather alerts.

DISCLAIMER: This is an open source project and doesn't have any connection with meteoalarm.eu.

To install enter in a command line:

pip install meteoalarm-rssapi

Now, lets see a simple example:

from meteoalarm_rssapi import MeteoAlarm
meteo = MeteoAlarm('DE', 'Kreis Ahrweiler')

print(meteo.alerts())

and you will get (after some pprint):

alert_id: 3820923534
message_id: 1817809724
awareness_type: Snow/Ice
awareness_level: Yellow
country: DE
region: Kreis Ahrweiler
published: 2021-01-26T12:23:00+01:00
from: 2021-01-26T18:00:00+01:00
until: 2021-01-27T11:00:00+01:00
message:
  deutsch: Es tritt im Warnzeitraum oberhalb 400 m leichter
  Schneefall mit Mengen zwischen 1 cm und 3 cm auf. In Staulagen
  werden Mengen bis 5 cm erreicht. Die Schneefallgrenze steigt auf
  1500 Meter. Verbreitet wird es glatt.
  english: There is a risk of light snowfall (Level 1 of 4).
  Height range: > 400 m;
  Precipitation amounts: 1-3 cm; in windward areas: < 5 cm;
  snowfall level: rising to 1500 meter

You need to know your 2-letter iso country code (e.g. DE) and the exact name of your region as reported by your national agency to meteoalarm.eu (e.g. Kreis Ahrweiler). For that, please check the page for your country in meteoalarm.eu, or run the following script:

from meteoalarm_rssapi import get_regions

print(get_regions('DE'))

The timestamps for published, from and until are in ISO8601 format, so that you can (easily) convert them to your local date/time.

There are two pieces of information that could be important for your applications:

  1. alert_id changes to a new value when there is a change in the message or in the day/month of from. So, doesn't change if there are only a revision of the H:M, a revision for until or a change in the awareness_level.
  2. message_id changes with any change in message, published, from, until or awareness_level.

In conclusion, for one alert_id there are several message_id (that can be taken as the revisions of the alert_id).

Project details


Download files

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

Source Distribution

meteoalarm_rssapi-0.2.2.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

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

meteoalarm_rssapi-0.2.2-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file meteoalarm_rssapi-0.2.2.tar.gz.

File metadata

  • Download URL: meteoalarm_rssapi-0.2.2.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.9

File hashes

Hashes for meteoalarm_rssapi-0.2.2.tar.gz
Algorithm Hash digest
SHA256 8cd44e266268cdfc0d60fe6f489678674c863f7258a19e4c94f795c3a41f2aac
MD5 1ed93831a2d5334eddfee84a04ed1c87
BLAKE2b-256 32f0b405c7f2372bef184974569bf6cfa57682ad081e910e691c6f7e2818d4b3

See more details on using hashes here.

File details

Details for the file meteoalarm_rssapi-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: meteoalarm_rssapi-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.9

File hashes

Hashes for meteoalarm_rssapi-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bff1a13c068c6340d1ff3c76416b251534a5869fa272ac9b7ff603b02f8eae3
MD5 c1c2954767c934f5d529d0f6c85a1bbf
BLAKE2b-256 f20d719864b955288812371ef2d2b29b34bfd975280b43a6c0d83ae080fa79c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page