Repository to get ©AEMET weather predictions and publish them on telegram channels (E.g. Balearic Islands Channel). Why? To be able to access this information in areas of low or sporadic mobile coverage.
pipenv install
pipenv run pytest .
You must create a file called .env
in the root folder with this environment vars or set those vars when you call the
script:
AEMET_API_KEY=54653MY.Aemet.455845API.key
TELEGRAM_TOKEN=6352785479:MyTelegram-TOken
MAR_FORECAST_COASTAL_CHAT_ID=-10054478265423
MAR_FORECAST_COASTAL_CODE=ILLES_BALEARS
The API REST developed by AEMET needs an api key. You can request it here: https://opendata.aemet.es/centrodedescargas/altaUsuario
You will need a token for the telegram bot that writes the messages. Learn more about it here: https://core.telegram.org/bots/api#authorizing-your-bot
The telegram channel where the messages will be published and in which your bot must have admin write permissions, has
an id similar to -10054478265423
.
You can see the available coast_codes
in the following configuration file:
src/config.py
pipenv run python src/main.py