Skip to main content

Download Meteorological Data from OPEN-METEO API (https://open-meteo.com/en/)

Project description

openmeteopy

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.

openmeteopy runs on Python 3.6+.

print(mgr.get_data())

Options input parameters

  1. latitude - Latitude (float)
  2. longitude - Longitude (float)
  3. windspeed_unit - wind speed unit (string, optional)
  4. precipitation_unit - precipitation amount units (string, optional)
  5. 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)
  6. 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)
  7. past_days - If past_days is set, yesterdays or the day before yesterdays data are also returned.

Installation

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

Example

Download Meteorological data

from openmeteo_py.Hourly import Hourly,Daily,Options,OWmanager

# 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()

print(meteo)

_Contributors (coding, testing, packaging, reporting issues) are welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openmeteo_py-0.0.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

openmeteo_py-0.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file openmeteo_py-0.0.1.tar.gz.

File metadata

  • Download URL: openmeteo_py-0.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.3

File hashes

Hashes for openmeteo_py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8beddc286cc50939f7eedd120f57afe44af487c2a57df07f2e86a5f49f5b6953
MD5 7a90acd32dd357342aadc8d88d49e39a
BLAKE2b-256 cfcae43fb7b169c2b75717c18591b3e779925cbf9b7c60cd7304cd70f70813d2

See more details on using hashes here.

File details

Details for the file openmeteo_py-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: openmeteo_py-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.3

File hashes

Hashes for openmeteo_py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 872df0d59119d68411014736fc4aacdec4996027a9cf641914e082a41f7831ce
MD5 48d90b3ff4d2f87866a57217a157ac43
BLAKE2b-256 7dbd51c2ea1ed6178a425426637ffd0eaf348b65b8579e7fb1e3585153414d01

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page