action0-open-meteo-api
Fully typed Python clients for the Open-Meteo weather APIs, built on action0-client: every endpoint is a typed operation dataclass that runs synchronously, on asyncio or on Twisted — the backend you plug in decides, and the static types follow along.
The code is generated from Open-Meteo's official OpenAPI schemas by action0-client-openapi and checked in — this project doubles as the worked real-world example of that generator (see How this library was generated).
uv add "action0-open-meteo-api[httpx]"
from action0.open_meteo.forecast import ForecastClient, GetV1Forecast, GetV1ForecastHourlyItem
from action0.client.backends.requests import RequestsBackend
client = ForecastClient(RequestsBackend()) # https://api.open-meteo.com
weather = client.send(
GetV1Forecast(
latitude="48.21",
longitude="16.37",
hourly=[GetV1ForecastHourlyItem.TEMPERATURE_2M, GetV1ForecastHourlyItem.RAIN],
forecast_days=1,
)
)
print(weather.hourly.temperature_2m) # [17.2, 16.8, ...]
from action0.client.backends.httpx import AsyncHttpxBackend
client = ForecastClient(AsyncHttpxBackend())
weather = await client.send(GetV1Forecast(latitude="48.21", longitude="16.37"))
One subpackage per Open-Meteo service, each client preset to its base URL:
Subpackage (action0.open_meteo....) |
Client | API |
|---|---|---|
forecast |
ForecastClient |
api.open-meteo.com — weather forecasts |
historical_weather |
HistoricalWeatherClient |
archive-api.open-meteo.com — 1940 → today |
air_quality |
AirQualityClient |
air-quality-api.open-meteo.com |
marine |
MarineClient |
marine-api.open-meteo.com — waves & swell |
ensemble |
EnsembleClient |
ensemble-api.open-meteo.com — ensemble members |
seasonal |
SeasonalClient |
seasonal-api.open-meteo.com — up to 9 months |
climate |
ClimateClient |
climate-api.open-meteo.com — climate change projections |
flood |
FloodClient |
flood-api.open-meteo.com — river discharge |
elevation |
ElevationClient |
api.open-meteo.com/v1/elevation |
geocoding |
GeocodingClient |
geocoding-api.open-meteo.com — place name → coordinates |
Enumerable request parameters are generated enums (IDE completion knows
the legal weather variables), dates are datetime.date, and every JSON
answer parses into plain typed dataclasses — mypy strict, pyright and ty
pass on the generated code. Even the error path is typed: Open-Meteo's
documented 400 answer raises a generated BadRequestError carrying the
parsed reason. The Open-Meteo APIs are free for
non-commercial use without an API key (terms);
commercial subscriptions pass their key as the operations' apikey
field.
Requires Python 3.11 or newer.
Full documentation including the API reference: https://laughinjar.github.io/action0-open-meteo-api/
Development
Uses uv: uv run pytest runs the tests,
uv run ruff format && uv run ruff check formats and lints, uv run mypy, uv run pyright and uv run ty check type-check (all strict —
on the generated code too). The generated subpackages under
src/action0/open_meteo/ are regenerated from the schemas in
schemas/ with bash tools/regenerate.sh — never edited by hand.
AI disclosure
This library was developed with substantial help from Claude (Anthropic), under human direction and review. The client code itself is generated by action0-client-openapi from Open-Meteo's OpenAPI schemas.
License
MIT — see LICENSE. Open-Meteo data and APIs are subject to Open-Meteo's terms (CC BY 4.0 attribution).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file action0_open_meteo_api-0.1.0.tar.gz.
File metadata
- Download URL: action0_open_meteo_api-0.1.0.tar.gz
- Upload date:
- Size: 228.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60633839a2b0bff7000e46b927859867f06a02bbd71d79be43687d125da194bc
|
|
| MD5 |
0402d81e0c4fde0bd62706650bae9e8c
|
|
| BLAKE2b-256 |
e98e157c0ec694a86dc9f2970b3ac1a810f371ed7d636e1f3e7d4ee7a6eab8eb
|
Provenance
The following attestation bundles were made for action0_open_meteo_api-0.1.0.tar.gz:
Publisher:
release.yml on LaughInJar/action0-open-meteo-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
action0_open_meteo_api-0.1.0.tar.gz -
Subject digest:
60633839a2b0bff7000e46b927859867f06a02bbd71d79be43687d125da194bc - Sigstore transparency entry: 2476886383
- Sigstore integration time:
-
Permalink:
LaughInJar/action0-open-meteo-api@32ec4b731f9b51221f7a19ede5f57ea399a5a435 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LaughInJar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@32ec4b731f9b51221f7a19ede5f57ea399a5a435 -
Trigger Event:
push
-
Statement type:
File details
Details for the file action0_open_meteo_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: action0_open_meteo_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 78.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
126f318921d6a4b6c7b5e5c02428ae7213c9ac61257b765249883e6c521386e6
|
|
| MD5 |
5d4522fc07250f836e2ad26fae1c4225
|
|
| BLAKE2b-256 |
09d72313abec14e9b8b81236a3564688570e1e17b02db0c0610b7f524b8e57f5
|
Provenance
The following attestation bundles were made for action0_open_meteo_api-0.1.0-py3-none-any.whl:
Publisher:
release.yml on LaughInJar/action0-open-meteo-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
action0_open_meteo_api-0.1.0-py3-none-any.whl -
Subject digest:
126f318921d6a4b6c7b5e5c02428ae7213c9ac61257b765249883e6c521386e6 - Sigstore transparency entry: 2476886436
- Sigstore integration time:
-
Permalink:
LaughInJar/action0-open-meteo-api@32ec4b731f9b51221f7a19ede5f57ea399a5a435 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LaughInJar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@32ec4b731f9b51221f7a19ede5f57ea399a5a435 -
Trigger Event:
push
-
Statement type: