Skip to main content

aiometeogate

Asynchronous Python client for EUMETNET MeteoGate (E-SOH) near-real-time weather observations. MeteoGate publishes observations from about 4,000 European stations (FMI, MET Norway, KNMI, Météo-France and others).

  • Live data over MQTT (WebSocket, TLS): MeteoGateMqttClient subscribes per station, reconnects with backoff and parses each notification into an Observation.
  • EDR API over HTTPS: MeteoGateEdrClient lists stations, fetches station metadata and returns the newest value of every timeseries. MeteoGate keeps 24 hours of data.

The library was written for the Home Assistant MeteoGate integration but has no Home Assistant dependency.

Installation

pip install aiometeogate

Python 3.13 or newer.

Usage

import asyncio
from datetime import UTC, datetime, timedelta

from aiometeogate import MeteoGateEdrClient, MeteoGateMqttClient

KAISANIEMI = "0-246-0-100971"  # WIGOS station identifier


async def main() -> None:
    async with MeteoGateEdrClient() as edr:
        stations = await edr.async_get_stations(bbox=(24.5, 60.0, 25.3, 60.4))
        latest = await edr.async_get_latest_observations(
            KAISANIEMI, since=datetime.now(UTC) - timedelta(hours=3)
        )
    for key, observation in sorted(latest.items()):
        print(key.parameter_name, observation.value, observation.unit)

    client = MeteoGateMqttClient()
    client.subscribe_station(KAISANIEMI, lambda obs: print(obs.key, obs.value))
    await client.connect()
    await client.run()  # runs until cancelled or client.disconnect()


asyncio.run(main())

One MQTT topic can carry several variants of a quantity, for example 2-minute and 10-minute mean wind speed. Each Observation therefore has a ParameterKey of standard name, level, aggregation function and period, written the same way as EDR parameter names, e.g. wind_speed:10.0:mean:PT10M.

Values that providers mark as missing (-32767, -9999, NaN, …) become None. FMI's snow depth of -1 ("no snow cover") becomes 0.

Command line

python -m aiometeogate nearest 60.17 24.94
python -m aiometeogate latest 0-246-0-100971
python -m aiometeogate watch 0-246-0-100971 0-20000-0-01492 --minutes 15

Notes on the service

  • The broker is public: wss://observations.meteogate.eu/mqtt/, user and password everyone.
  • Messages are not retained. After connecting, you only get new observations; use the EDR client to fill in the current values.
  • Providers may repeat an observation or send older ones late. Compare observed_at before replacing a value.
  • The broker drops connections that use a 60 second keepalive after about two minutes, so the client defaults to 20 seconds.

Data licence

The observations belong to the institutions that publish them and are generally licensed under CC BY 4.0. Each Observation and StationMetadata carries the institution to credit.

Development

uv sync
uv run pytest            # unit tests; `-m live` runs tests against the real service
uv run ruff check . && uv run ruff format --check . && uv run mypy src tests scripts
uv run python scripts/record_fixtures.py edr   # refresh recorded fixtures

License

MIT

Metadata

Release files for aiometeogate 0.1.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 aiometeogate 0.1.0
File Size Uploaded
aiometeogate-0.1.0.tar.gz 46.2 kB Details

Built distribution (wheel)

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

Total release size: 64.8 kB

Release files / aiometeogate-0.1.0.tar.gz

Download URL aiometeogate-0.1.0.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
17f18c3e465ce99e1c65c433ef0862437d946dd160ab6eb1d9f5dee58b11c83c
BLAKE2b-256 checksum
How to use checksums
2c6ca0ae821f9e0084699a1429e4b62253c995047b0f1a07c959204f2a687f68
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 Oct 10, 2026.

Transparency log

Release files / aiometeogate-0.1.0-py3-none-any.whl

Download URL aiometeogate-0.1.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed933c4beb056d7e02d11314a199d1914969dc2082887f2af4ec94c6ee14155f
BLAKE2b-256 checksum
How to use checksums
fb4f2554db4695f22f556c77b8ede8e4a51cac8997c4643457d1df5501cd1a98
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 Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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