Download Meteorological Data from OPEN-METEO API (https://open-meteo.com/en)
Open-Meteo collaborates with National Weather Services providing Open Data with 11 to 2 km resolution. Our high performance APIs select the best weather model for your location and provide data as a simple JSON API.
APIs are free without any API key for open-source developers and non-commercial use. You can embed them directly into your app.
openmeteopy is a client Python wrapper library for Open-Meteo web API. It allows quick and easy consumption of OM data from Python applications via a simple object model and in a human-friendly fashion.
openmeteopy runs on Python 3.6+.
print(mgr.get_data())
- latitude - Latitude (float)
- longitude - Longitude (float)
- windspeed_unit - wind speed unit (string, optional)
- precipitation_unit - precipitation amount units (string, optional)
- timeformat - If format unixtime is selected, all time values are returned in UNIX epoch time in seconds. Please note that all time is then in UTC! For daily values with unix timestamp, please apply utc_offset_seconds again to get the correct date. (string, optional)
- timezone - If timezone is set, all timestamps are returned as local-time and data is returned starting at 0:00 local-time. Any time zone name from the time zone database is available under timezones.py . (string, optional)
- past_days - If past_days is set, yesterdays or the day before yesterdays data are also returned.
git clone https://github.com/m0rp43us/openmeteopy
cd openmeteopy/
pip3 install .
Download Meteorological data
from openmeteopy import OWmanager,Daily,Hourly,Options
# Latitude, Longitude for Rabat,Morocco
latitude = 33.9842
longitude = -6.8675
hourly = Hourly()
daily = Daily()
options = Options(latitude,longitude)
mgr = OWmanager(options,
hourly.all(),
daily.all())
# Download data
meteo = mgr.get_data()
_Contributors (coding, testing, packaging, reporting issues) are welcome!