Skip to main content

Async API to retrieve data from the Belgian IRM KMI in Python

The package exposes the data from the mobile application of the Belgian IRM KMI as a Python module.

See more information in the wiki: https://github.com/jdejaegh/irm-kmi-api/wiki

Quick start example

import aiohttp
import asyncio
from zoneinfo import ZoneInfo
from irm_kmi_api import IrmKmiApiClientHa

async def print_weather():
    session = aiohttp.ClientSession()
    client = IrmKmiApiClientHa(session=session, user_agent="jdejaegh/irm-kmi-api README example")
    await client.refresh_forecasts_coord({'lat': 50.47, 'long': 4.87})
    await session.close()

    weather = client.get_current_weather(tz=ZoneInfo('Europe/Brussels'))
    city = client.get_city()

    print(f"{weather['temperature']}°C with wind of {weather['wind_speed']} km/h in {city}")


if __name__ == '__main__':
    asyncio.run(print_weather())

Features

The package provides the following:

  1. Current weather
  2. Hourly and daily forecast
  3. Rain radar forecast and animation
  4. Warning data (for extreme weather condition such as storm, thunder, floods)
  5. Pollen data
Screenshots of the rain radar animation

Limitations

The package does not provide the 14-days forcast as in the application.

This package will not implement any feature that is not available via the API (e.g., humidity and dew point data is not provided by the API and thus is not available in this package).

Usage considerations

The API is not publicly documented and has been reversed engineered: it can change at any time without notice and break this package.

Be mindful when using the API: put a meaningful User-Agent string when creating an IrmKmiApiClient and apply rate-limiting for your queries.

Contributions

Contributions are welcome. Please discuss major changes in an issue before submitting a pull request.

Disclaimer

This is a personal project and isn't in any way affiliated with, sponsored or endorsed by The Royal Meteorological Institute of Belgium.

All product names, trademarks and registered trademarks in (the images in) this repository, are property of their respective owners. All images in this repository are used by the project for identification purposes only.

Metadata

Release files for irm-kmi-api 1.2.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 irm-kmi-api 1.2.0
File Size Uploaded Provenance Actions
irm_kmi_api-1.2.0.tar.gz 1.0 MB Without provenance Details for irm_kmi_api-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for irm-kmi-api 1.2.0
File Interpreter ABI Platform Actions
irm_kmi_api-1.2.0-py3-none-any.whl Python 3 none any Details for irm_kmi_api-1.2.0-py3-none-any.whl

Total release size: 2.0 MB

Release files / irm_kmi_api-1.2.0.tar.gz

Download URL irm_kmi_api-1.2.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
7bc1bf3bfa0c63ee5078c780e04298247783f9d17ece4ef8972225ef025b53c3
BLAKE2b-256 checksum
How to use checksums
fe3f215d4baa50718e53213387110b6f3c09fcd4717e0c144e6d29f23fb4d4d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / irm_kmi_api-1.2.0-py3-none-any.whl

Download URL irm_kmi_api-1.2.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
37b775bcd2009a7d2cf90eee62fd753b30e0b9b038239aa7f22a4fa05c3b4087
BLAKE2b-256 checksum
How to use checksums
c005057c66e38d431aafc9bde6e8cf5984cff9d1219745218cfffabe92351445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for irm-kmi-api 1.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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