{"id":21567,"library":"meteomatics","title":"meteomatics","description":"Python client for the Meteomatics Weather API. Provides access to historical, current, and forecast weather data. Latest version: 3.0.0, actively maintained.","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/meteomatics/python-connector-api","tags":["weather-api","meteomatics","climate-data","forecast"],"install":[{"cmd":"pip install meteomatics","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP requests to API","package":"requests","optional":false},{"reason":"DataFrame output for time series","package":"pandas","optional":true}],"imports":[{"note":"In v3.0.0 the main class has been removed; use the module-level functions.","wrong":"from meteomatics import MeteomaticsConnector","symbol":"MeteomaticsConnector","correct":"import meteomatics"},{"note":"Commonly used function, ensure correct import path.","wrong":null,"symbol":"query_time_series","correct":"from meteomatics import query_time_series"}],"quickstart":{"code":"import datetime as dt\nfrom meteomatics import query_time_series\n\nusername = os.environ.get('METEOMATICS_USER', '')\npassword = os.environ.get('METEOMATICS_PASSWORD', '')\n\nnow = dt.datetime.utcnow()\nstartdate = now - dt.timedelta(days=1)\nenddate = now\ninterval = dt.timedelta(hours=1)\nparameters = ['t_2m:C']\nlocations = [(50.0, 10.0)]\n\ndf = query_time_series(startdate, enddate, interval, parameters, locations, username, password)\nprint(df.head())","lang":"python","description":"Query hourly temperature for a single point over the last 24 hours."},"warnings":[{"fix":"Update calls to current API functions: e.g., use `query_grid_unpivoted` instead of `query_grid`.","message":"v3.0.0 removed deprecated functions like `query_dem` and `query_grid` without the `_unpivoted` suffix.","severity":"breaking","affected_versions":"<3.0.0 to 3.0.0"},{"fix":"Pass credentials to each function call, not through a connector object.","message":"The module-level functions (e.g., query_time_series) require username and password passed directly; the old MeteomaticsConnector class is gone.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Use pytz or zoneinfo to make datetimes aware before passing.","message":"Time parameters must be timezone-aware for SQL-like queries; naive datetimes may raise errors.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use module-level functions like `from meteomatics import query_time_series`.","cause":"v3.0.0 removed the MeteomaticsConnector class.","error":"ImportError: cannot import name 'MeteomaticsConnector' from 'meteomatics'"},{"fix":"Remove `on_invalid` argument from time series calls, or use it with `query_grid_unpivoted`.","cause":"`on_invalid` parameter is only available for grid queries, not time series.","error":"TypeError: query_time_series() got an unexpected keyword argument 'on_invalid'"},{"fix":"Convert naive datetimes using `pytz.UTC.localize()` or `datetime.replace(tzinfo=zoneinfo.ZoneInfo('UTC'))`.","cause":"SQL-like parameters require timezone-aware datetime objects.","error":"ValueError: startdate and enddate must be timezone-aware"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}