Skip to main content

Library for fetching weather information from Finnish Meteorological Institute (FMI)

Project description

Test Last commit Latest version in GitHub Latest version in PyPi

Finnish Meteorological Institute Weather

Library for fetching weather information from Finnish Meteorological Institute (FMI).

Originally build for personal use because I wanted to create FMI integration for Home Assistant.

BETA WARNING! This is still under heavy development. The public API is not frozen yet so DO NOT consider it to be stable. Any version can have breaking changes.

How to use

Working example can be found in example.py.

Install

$ pip install fmi-weather-client 

Get weather and forecasts

import fmi_weather_client

weather1 = fmi_weather_client.weather_by_coordinates(60.170998, 24.941325)
weather2 = fmi_weather_client.weather_by_place_name("Rastila, Helsinki")
forecast1 = fmi_weather_client.forecast_by_place_name("Jäppilä, Pieksämäki")
forecast2 = fmi_weather_client.forecast_by_coordinates(67.6894, 28.62406, timestep_hours=12)

If data is not available, the following exception is thrown:

fmi_weather_client.errors.NoWeatherDataError

Weather data

FMI provides the following commonly used information:

  • Temperature (°C)
  • Pressure (hPa)
  • Humidity (%)
  • Wind direction (°)
  • Wind speed (m/s)
  • Wind gust (m/s)
  • Dew point (°)
  • Cloud coverage (%)
  • Precipitation intensity (mm/h)
  • Symbol Documentation in Finnish

There are also other information available. Check models.py and FMI documentation for more info.

Development

Setup

Create and activate a virtual environment

$ python -m venv venv
$ source venv/bin/activate

Install required packages

$ make setup-dev-env

Deactivate virtual environment when you are done

$ deactivate

Run tests

This will run unit tests and code quality checks

$ make test

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

fmi-weather-client-0.0.8.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

fmi_weather_client-0.0.8-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file fmi-weather-client-0.0.8.tar.gz.

File metadata

  • Download URL: fmi-weather-client-0.0.8.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for fmi-weather-client-0.0.8.tar.gz
Algorithm Hash digest
SHA256 edd709b69a0fad35ed4963e3f851728cd67379feb05625b3035b1c863c324f01
MD5 907ebe8d8182e7ad8dac9783534aa6b6
BLAKE2b-256 6b78566026fd5d1cea6f86573b534ba725b779a144d1997a83a05e034125853e

See more details on using hashes here.

File details

Details for the file fmi_weather_client-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: fmi_weather_client-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for fmi_weather_client-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb1bbfbbc7d1a684dfd686cd195087ed85fda2569790843a3c6784b7b17d723
MD5 9db906bdb93b7d6411dfa08f4edb84d3
BLAKE2b-256 887c71d585d89441e898ee53b655c6841c4d5985a9490ba2bcf7240e2804c918

See more details on using hashes here.

Supported by

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