Skip to main content

aioopenmeteo

Async Python client for the free Open-Meteo weather forecast and air quality APIs, written for the Open-Meteo Home Assistant integration.

  • Pick any of Open-Meteo's ~50 weather models, or Best match (the default).
  • One request gets current conditions (50+ variables), hourly and daily forecasts and 15-minute data.
  • Air quality and pollen (CAMS Europe / global) from the separate air quality API.
  • Values are kept by their Open-Meteo variable name, so everything the API returns is available.
  • Variables a model doesn't provide are None, and days past a model's horizon are dropped.
  • WMO weather codes mapped to Home Assistant conditions, plus moon phase names.

Install

pip install aioopenmeteo

Usage

import asyncio
from aioopenmeteo import OpenMeteoClient


async def main() -> None:
    async with OpenMeteoClient(55.64, 12.08, model="dmi_seamless", forecast_days=7) as client:
        forecast = await client.get_forecast()
        now = forecast.current
        print(now["temperature_2m"], now["wind_speed_10m"], now.condition)

        for day in forecast.daily:
            print(day.date, day["temperature_2m_min"], day["temperature_2m_max"], day.condition)

        air = await client.get_air_quality()
        print(air.current["european_aqi"], air.current["birch_pollen"])


asyncio.run(main())

In Home Assistant, pass the shared session: OpenMeteoClient(lat, lon, session=async_get_clientsession(hass)).

Models

aioopenmeteo.MODELS lists the selectable models (id, name, provider, regional). Regional models (e.g. dmi_harmonie_arome_europe, jma_msm) only cover part of the world. Elsewhere the API answers with an error, raised as OpenMeteoInvalidLocationError.

forecast.available("current") returns the variables the chosen model actually has values for. This is useful for deciding which sensors to create.

Units

Data is always requested in Open-Meteo's default metric units:

  • temperature in °C
  • wind in km/h
  • precipitation in mm (snowfall in cm, snow depth in m)
  • pressure in hPa
  • visibility in m
  • radiation in W/m²
  • durations in seconds

Errors

Exception When
OpenMeteoConnectionError Network problem or timeout
OpenMeteoInvalidLocationError The model has no data for the location
OpenMeteoRateLimitError Free limit reached (HTTP 429)
OpenMeteoRequestError Any other HTTP error, reason from the API
OpenMeteoParseError Unexpected response

All of them derive from OpenMeteoError.

Terms and attribution

The free API is for non-commercial use, within 10,000 calls per day, 5,000 per hour and 600 per minute. Large requests count as more than one call. Data is licensed CC BY 4.0, so show aioopenmeteo.ATTRIBUTION ("Weather data by Open-Meteo.com") with it. For commercial use, get an API key from Open-Meteo and pass api_key=..., which uses the customer- API hosts.

License

MIT

Metadata

Release files for aioopenmeteo 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 aioopenmeteo 0.1.0
File Size Uploaded Provenance Actions
aioopenmeteo-0.1.0.tar.gz 17.6 kB With provenance Details for aioopenmeteo-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 33.6 kB

Release files / aioopenmeteo-0.1.0.tar.gz

Download URL aioopenmeteo-0.1.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0f5740787e881605d8be27de4ce93b7ab92265ee095c248757367f1e3cc0b16f
BLAKE2b-256 checksum
How to use checksums
e9292b3e868136b6216a0fb97e0f8575f4594e7d41588ff82b3ab4322abc810e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

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

Download URL aioopenmeteo-0.1.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2236dd0c4421c0496392cbc9ced2726ff3cb525faf8526b48d102639d5447da
BLAKE2b-256 checksum
How to use checksums
c5214c6353d6210a36a65db5c6d80f47c64737976828ff181abb379899716e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for aioopenmeteo 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aioopenmeteo-0.1.0.tar.gz

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 Nov 18, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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