Skip to content

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.

License

Notifications You must be signed in to change notification settings

eUgEntOptIc44/openmeteopy

 
 

Repository files navigation

OpenmeteoPy

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.

What is it?

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.

You can use all Openmeteo's available APIs,which are 14 (explained in the table below).

openmeteopy runs on Python 3.6+.

print(mgr.get_data())

Installation (pypi)

working on it

Installation (manually)

git clone https://github.com/m0rp43us/openmeteopy
cd openmeteopy-main/
pip3 install .

APIs

API Description Documentation Options Class Hourly Class Daily Class 15 Minutes Class
Weather forecast Select your location, weather variables and start using the API. weather forecast ForecastOptions() HourlyForecast() DailyForecast() -
Historical Weather Discover how weather has shaped our world from 1940 until now historical weather HistoricalOptions() HourlyHistorical() DailyHistorical() -
ECMWF Weather Forecast Global High Frequency Forecasts at 0.4° resolution ECMWF Weather Forecast EcmwfOptions() HourlyEcmwf() - -
GFS & HRRR Forecast Global GFS model combined with hourly HRRR updates at 3-km resolution GFS & HRRR Forecast GfsOptions() HourlyGfs() DailyGfs() -
MeteoFrance Global ARPEGE model combined with high resolution AROME model MeteoFrance MeteoFranceOptions() HourlyMeteoFrance() DailyMeteoFrance() -
DWD ICON Open data weather forecasts from the German weather service DWD DWD ICON DwdOptions() HourlyDwd() DailyDwd() FifteenMinutesDwd()
JMA 5-km high resolution forecasts for Japan, Korea, parts of China and Russia JMA JmaOptions() HourlyJma() DailyJma() -
MET Norway Hourly updates & 1 km forecasts for Scandinavia MET Norway MetnoOptions() HourlyMetno() - -
GEM 2.5 km high resolution forecasts for North America GEM GemOptions() HourlyGem() DailyGem() -
Marine Weather Hourly wave forecasts at 5 km resolution Marine Weather MarineOptions() HourlyMarine() DailyMarine() -
Air Quality Pollutants and pollen forecast in 11 km resolution Air Quality AirQualityOptions() HourlyAirQuality() - -
Geocoding Search locations in any language globally Geocoding GeocodingOptions() - - -
Elevation 90 meter resolution digital elevation model Elevation ElevationOptions() - - -
Global Flood Simulated river discharge at 5 km resolution from 1984 up to 7 months forecast Global Flood FloodOptions() - DailyForecast() -

Output formats : (I know it kindda sucks with integers as inputs,will change it soon)

You can get your output in json,dataframe or save it as csv or excel file as follows : get_data(output = 0,file = 0,filepath = None):

Ooutput get_data Method values
json (server response) get_data()
json (keys are dates,value are correspongding values) get_data(1)
json (keys are dates,value are correspongding values) saved into a json file get_data(1,1)
csv (keys are dates,value are correspongding values) saved into a csv file get_data(1,1,'path')
excel (keys are dates,value are correspongding values) saved into a excel file get_data(1,2,'path')
dataframe in excel (keys are dates,value are correspongding values) saved into a excel file get_data(1,3,'path')

Upcoming Changes,updates,things to do :

  • Add the other 2 variables to ECWMF pressure level parameters
  • Change get_data() method to a more developper friendly method
  • Add Documentation for dataframit() and jsonify()
  • remove pressure level variables from JMA (Remove inheritence from FranceMeteo)
  • Add Support of Date Types (input and output)
  • Add versionning and package to pypi
  • Clean and add corresponding comments
  • Maybe Refactor OWmanager Class and add inheritence for a more Dev friendly Methods
  • Readthedocs

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 99.7%
  • Other 0.3%