an "API" for meteoalarm.eu using the rss feeds.
Project description
An API for meteoalarm.eu weather alerts.
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
from: 19.01.2021 10:00 CET
until: 19.01.2021 12:00 CET
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 iso 2-letter 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.
There are two pieces of information that could be important for your applications:
alert_id
changes to a new value when there is a change in themessage
or in the day/month offrom
. So, doesn't change if there are only a revision of the H:M, a revision foruntil
or a change in theawareness_level
.message_id
changes with any change inmessage
,from
,until
orawareness_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
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
meteoalarm_rssapi-0.1.3.tar.gz
(31.6 kB
view hashes)
Built Distribution
Close
Hashes for meteoalarm_rssapi-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63fcb2dc0f5f53da8b4b9993b1001aefac311b6aa943f6cb3a0d4b9c7fb1720f |
|
MD5 | 8cf39850e7dc3d5bcffb5fdd0d1b108c |
|
BLAKE2b-256 | ec7548518a73948b523f5cc477fbcce947b97ac73ee413e1fa08bf62202690f5 |