Skip to content

aiopywttr

Typed asyncio client for the wttr.in weather API. Without asyncio, use pywttr.

Installation

uv add aiopywttr pywttr-models
pip install -U aiopywttr pywttr-models

pywttr-models holds the response models and gets its own releases when wttr.in changes its responses. Naming it keeps pip install -U upgrading it along with aiopywttr.

Quick start

import asyncio

import aiopywttr


async def main() -> None:
    async with aiopywttr.Wttr() as wttr:
        weather = await wttr.weather("Paris")

    now = weather.current_condition[0]
    print(f"{now.temp_c} °C, {now.weather_desc[0].value}")


asyncio.run(main())

Next steps

  • Guide: current weather, forecasts, languages, timeouts, errors.
  • API reference: every class and method, and the response fields shared by all languages.