In order to access weather data from the API as convenient as possible, Meteomatics offers sample code and open source Python modules for the easy retrieval of any type of weather data. This includes, e.g. time series of various weather model data, station data, forecast data, radar and satellite images.
Examples to help you get started with the python connector can be found here
Use the link below to access the most recent version of our Python Weather API Connector on our GitHub repository:
Example code of how to get data for a time series:
import datetime as dt
import meteomatics.api as api
username = 'max'
password = 'mustermann'
coordinates = [(47.11, 11.47)]
parameters = ['t_2m:C', 'precip_1h:mm', 'wind_speed_10m:ms']
model = 'mix'
startdate = dt.datetime.utcnow().replace(minute=0, second=0, microsecond=0)
enddate = startdate + dt.timedelta(days=1)
interval = dt.timedelta(hours=1)
df = api.query_time_series(coordinates, startdate, enddate, interval, parameters, username, password, model=model)