Description
MeteoGalicia-API implements an interface to the MeteoGalicia Rest web services.
Documentation about MeteoGalicia web service is available at https://www.meteogalicia.gal/web/RSS/rssIndex.action?request_locale=es.
This package has been developed to be used with homeassistant-meteogalicia integration for Home-Assistant
Disclaimer
This software is provided without warranty, and should therefore not be used where it may endanger life, financial stakes, or cause discomfort and inconvenience to others. Is also licensed under the GNU Public Licence version 3
Usage
Example:
from meteogalicia_api.interface import MeteoGalicia
meteogalicia = MeteoGalicia()
meteogalicia.get_forecast_data("32054")
meteogalicia.get_observation_data("15023")
Custom session and timeout:
import requests
from meteogalicia_api.interface import MeteoGalicia
session = requests.Session()
meteogalicia = MeteoGalicia(session=session, timeout=10)
meteogalicia.get_forecast_data("32054")
Town hall or city data methods:
meteogalicia.get_forecast_data("32054")
meteogalicia.get_hourly_forecast_data("32054")
meteogalicia.get_medium_term_forecast_data("32054")
meteogalicia.get_observation_data("15023")
Parameter id's are available at https://www.meteogalicia.gal/datosred/infoweb/meteo/docs/rss/JSON_Pred_Concello_es.pdf
Hourly and medium term forecasts:
Both methods return the original JSON dictionary, including the forecast wrapper.
They return None if the request fails, the forecast container is missing or is
not an object, or its prediction list is missing, empty or is not a list. Individual
records are returned unchanged; the client does not validate every field.
| Method | Prediction list in the returned dictionary | Main fields |
|---|---|---|
get_hourly_forecast_data(id) |
data["predHoraria"]["listaPredDiaHoraria"] |
Each day contains dia and listaPredHora; each hour contains dataPredicion, tMedia, icoCeo and icoVento. |
get_medium_term_forecast_data(id) |
data["predMPrazo"]["listaPredDiaMPrazo"] |
Each day contains dataPredicion, dia, tMin, tMax, sky condition alternatives and their probabilities. |
- Hourly
dataPredicionvalues use local time in Galicia (Europe/Madrid) and contain no UTC offset. The client does not convert them to UTC. Consumers must account for the local time zone and daylight saving changes. - MeteoGalicia uses
-9999for unavailable weather values. The client preserves this sentinel; consumers should treat it as missing data, not as a temperature, probability or valid weather code. - Medium term
icoCeo1,icoCeo2andicoCeo3are possible sky conditions with correspondingprobIcoCeo1,probIcoCeo2andprobIcoCeo3probabilities. They are not morning, afternoon and night forecasts. Use the probabilities when choosing a representative condition. - The medium term forecast starts after the short term forecast. The number of days and hours varies with availability; combine daily forecasts using their dates rather than assuming fixed list lengths.
data = meteogalicia.get_hourly_forecast_data("15030")
if data is not None:
for day in data["predHoraria"]["listaPredDiaHoraria"]:
for hour in day["listaPredHora"]:
temperature = hour.get("tMedia")
if temperature is not None and temperature != -9999:
print(hour["dataPredicion"], temperature)
Official response schemas and weather codes: hourly forecast and medium term forecast.
Station methods:
meteogalicia.get_observation_dailydata_by_station("10144")
meteogalicia.get_observation_last10mindata_by_station("10144")
Parameter station id's are available at https://servizos.meteogalicia.gal/mgrss/observacion/listaEstacionsMeteo.action
Tides methods:
meteogalicia.get_forecast_tide("3")
id availables at: https://www.meteogalicia.gal/datosred/infoweb/meteo/docs/rss/RSS_Mareas_gl.pdf
Errors:
- Methods return
Nonewhen no data is available or the request fails.
Release files for MeteoGalicia-API 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| meteogalicia_api-0.1.3.tar.gz | 22.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| meteogalicia_api-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.4 kB
Release files / meteogalicia_api-0.1.3.tar.gz
| Download URL | meteogalicia_api-0.1.3.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eaebc4874f43c2fbc0020234a9144c010ae3b082642e1157cce2a53006a579a1
|
|
BLAKE2b-256 checksum How to use checksums |
381bab4e15d86f78ae26f53c833d0d5cdb9638474729056b57427f5e92bca9c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency logRelease files / meteogalicia_api-0.1.3-py3-none-any.whl
| Download URL | meteogalicia_api-0.1.3-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a44a3ad54180f86c13e7594107afe12fbaffa0f2cde3bb84923ad28511654f48
|
|
BLAKE2b-256 checksum How to use checksums |
8dd37d016a7b60cd9553bfa011b0a3a05339267aa0447128f5cacbaf676f077f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 26, 2026.
Transparency log