Registry / http-networking / meteomatics

meteomatics

JSON →
library4.0.0pypypi✓ verified 85d ago

Python client for the Meteomatics Weather API. Provides access to historical, current, and forecast weather data. Latest version: 3.0.0, actively maintained.

pip install meteomatics
INSTALL
IMPORT
SIG · METEOMATICS
M
meteomatics
http-networkingpythonv4.0.0
Install
8.3s avg
Import
Disk
170MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 168.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.3s · import 0.000s · 161MB
170MB installed
● package 170MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MeteomaticsConnector
import meteomatics
from meteomatics import MeteomaticsConnector
In v3.0.0 the main class has been removed; use the module-level functions.
query_time_series
from meteomatics import query_time_series
Commonly used function, ensure correct import path.

Query hourly temperature for a single point over the last 24 hours.

import datetime as dt from meteomatics import query_time_series username = os.environ.get('METEOMATICS_USER', '') password = os.environ.get('METEOMATICS_PASSWORD', '') now = dt.datetime.utcnow() startdate = now - dt.timedelta(days=1) enddate = now interval = dt.timedelta(hours=1) parameters = ['t_2m:C'] locations = [(50.0, 10.0)] df = query_time_series(startdate, enddate, interval, parameters, locations, username, password) print(df.head())
Debug
Known issues
breakingv3.0.0 removed deprecated functions like `query_dem` and `query_grid` without the `_unpivoted` suffix.
fix
Update calls to current API functions: e.g., use `query_grid_unpivoted` instead of `query_grid`.
affects: <3.0.0 to 3.0.0
gotchaThe module-level functions (e.g., query_time_series) require username and password passed directly; the old MeteomaticsConnector class is gone.
fix
Pass credentials to each function call, not through a connector object.
affects: >=3.0.0
gotchaTime parameters must be timezone-aware for SQL-like queries; naive datetimes may raise errors.
fix
Use pytz or zoneinfo to make datetimes aware before passing.
affects: >=3.0.0
Errors
Common errors & fixes
ImportError: cannot import name 'MeteomaticsConnector' from 'meteomatics'
v3.0.0 removed the MeteomaticsConnector class.
fix
Use module-level functions like `from meteomatics import query_time_series`.
TypeError: query_time_series() got an unexpected keyword argument 'on_invalid'
`on_invalid` parameter is only available for grid queries, not time series.
fix
Remove `on_invalid` argument from time series calls, or use it with `query_grid_unpivoted`.
ValueError: startdate and enddate must be timezone-aware
SQL-like parameters require timezone-aware datetime objects.
fix
Convert naive datetimes using `pytz.UTC.localize()` or `datetime.replace(tzinfo=zoneinfo.ZoneInfo('UTC'))`.
Upgrade
Version history
4.0.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
requestsrequiredHTTP requests to API
pandasoptionalDataFrame output for time series
Agent activity
6 hits · last 30 days
node
6
Resources
meteomatics — pip install meteomatics · libregistry