FMI weather observation and forecast fetcher
This library provides easy to use methods for fetching both observations and forecast data from Finnish Meteorological Institute (FMI). Currently just a quick hack, as I needed this for a project.
Installation
pip install fmi_weather
Usage
The library usage is fairly simple:
from fmi import FMI
f = FMI(place='Lappeenranta')
# f.observations() returns a list of Observation -objects for the last X hours.
print(f.observations())
Another way to set the API key and place is by setting them in environment variables FMI_PLACE. After setting the environment variables, you can use the library without "any" initialization:
from fmi import FMI
f = FMI()
# f.forecast() returns a list of Forecast -objects
print(f.forecast())
New in 1.1.0
place or coordinates are not longer required,
but they are respected if present.
This allows the usage of fmisid and wmo for definition of location,
allowing better transparency on what location is used.
You can list view a list of locations at: https://www.ilmatieteenlaitos.fi/havaintoasemat
For example:
from fmi import FMI
f = FMI()
# Fetch and print observations from Lappeenranta Airport
print(f.observations(fmisid=101237))
New in 1.2.0
Added a helper FMI.fetch_stations() for fetching the possible stations. For example:
>>> from fmi import FMI
>>> from pprint import pprint
>>> pprint([
... station
... for station in FMI.fetch_stations()
... if station['name'].startswith('Lappeenranta')
... ])
[{'fmisid': 101252,
'groups': ['sää'],
'height': 77,
'latitude': 61.2,
'longitude': 28.47,
'name': 'Lappeenranta Hiekkapakka',
'started': 2009,
'wmo': 2919},
{'fmisid': 101237,
'groups': ['sää'],
'height': 104,
'latitude': 61.04,
'longitude': 28.13,
'name': 'Lappeenranta lentoasema',
'started': 1950,
'wmo': 2958}]
Forecast icons
Thanks to FMI, SVG icons are also provided as part of the library.
The weather symbol information is only available for forecasts unfortunately,
so the Observation.icon -property is valid only for them.
.icon returns the SVG-file path and .icon_as_svg returns the content itself.
Metadata
Release files for fmi-weather 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fmi_weather-1.4.1.tar.gz | 2.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fmi_weather-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.6 MB
Release files / fmi_weather-1.4.1.tar.gz
| Download URL | fmi_weather-1.4.1.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30a44834ce79e7a3ecf533632f63b4c5d7c7cdb36999c10b8dcf7b0f13554f68
|
|
BLAKE2b-256 checksum How to use checksums |
ad9e556a426741047d49a6f204d7c8a96f7449e37e054c983994b4659d0eaa68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logRelease files / fmi_weather-1.4.1-py3-none-any.whl
| Download URL | fmi_weather-1.4.1-py3-none-any.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d76d6a30db83a0d79d6afa1259b6f52e414ed275a2e116611303a5901058a1f
|
|
BLAKE2b-256 checksum How to use checksums |
a2e9d7caeffcd2f90944c7bae089b85dcdc5e6539c92f03ddffdf92f4fe3ace4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency log