{"id":23728077,"url":"https://github.com/kipe/fmi","last_synced_at":"2025-09-04T05:30:50.229Z","repository":{"id":3166318,"uuid":"41407902","full_name":"kipe/fmi","owner":"kipe","description":"FMI weather observation and forecast fetcher","archived":false,"fork":false,"pushed_at":"2022-11-15T15:49:05.000Z","size":2683,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T08:28:40.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kipe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-26T06:14:35.000Z","updated_at":"2024-07-16T18:40:04.000Z","dependencies_parsed_at":"2023-01-13T12:19:48.493Z","dependency_job_id":null,"html_url":"https://github.com/kipe/fmi","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Ffmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Ffmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Ffmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kipe%2Ffmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kipe","download_url":"https://codeload.github.com/kipe/fmi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231933147,"owners_count":18448050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-31T01:48:48.311Z","updated_at":"2024-12-31T01:48:48.821Z","avatar_url":"https://github.com/kipe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"FMI weather observation and forecast fetcher\n============================================\n![Test Status](https://github.com/kipe/fmi/workflows/Test/badge.svg?branch=master)\n\nThis library provides easy to use methods for fetching both observations and\nforecast data from [Finnish Meteorological Institute (FMI)](https://en.ilmatieteenlaitos.fi/open-data).\nCurrently just a quick hack, as I needed this for a project.\n\n\nInstallation\n-----\n```\npip install fmi_weather\n```\n\nUsage\n-----\n\nThe library usage is fairly simple:\n```\nfrom fmi import FMI\nf = FMI(place='Lappeenranta')\n# f.observations() returns a list of Observation -objects for the last X hours.\nprint(f.observations())\n```\n\nAnother way to set the API key and place is by setting them in environment variables FMI_PLACE.\nAfter setting the environment variables, you can use the library without \"any\" initialization:\n```\nfrom fmi import FMI\nf = FMI()\n# f.forecast() returns a list of Forecast -objects\nprint(f.forecast())\n```\n\n### New in 1.1.0\n`place` or `coordinates` are not longer required,\nbut they are respected if present.\nThis allows the usage of `fmisid` and `wmo` for definition of location,\nallowing better transparency on what location is used.\n\nYou can list view a list of locations at:\nhttps://www.ilmatieteenlaitos.fi/havaintoasemat\n\nFor example:\n```\nfrom fmi import FMI\nf = FMI()\n# Fetch and print observations from Lappeenranta Airport\nprint(f.observations(fmisid=101237))\n```\n\n### New in 1.2.0\nAdded a helper `FMI.fetch_stations()` for fetching the possible stations. For example:\n```\n\u003e\u003e\u003e from fmi import FMI\n\u003e\u003e\u003e from pprint import pprint\n\u003e\u003e\u003e pprint([\n...   station\n...   for station in FMI.fetch_stations()\n...   if station['name'].startswith('Lappeenranta')\n... ])\n\n[{'fmisid': 101252,\n  'groups': ['sää'],\n  'height': 77,\n  'latitude': 61.2,\n  'longitude': 28.47,\n  'name': 'Lappeenranta Hiekkapakka',\n  'started': 2009,\n  'wmo': 2919},\n {'fmisid': 101237,\n  'groups': ['sää'],\n  'height': 104,\n  'latitude': 61.04,\n  'longitude': 28.13,\n  'name': 'Lappeenranta lentoasema',\n  'started': 1950,\n  'wmo': 2958}]\n```\n\nForecast icons\n--------------\n\nThanks to [FMI](https://github.com/fmidev/opendata-resources),\nSVG icons are also provided as part of the library.\n\nThe weather symbol information is only available for forecasts unfortunately,\nso the `Observation.icon` -property is valid only for them.\n`.icon` returns the SVG-file path and `.icon_as_svg` returns the content itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkipe%2Ffmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkipe%2Ffmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkipe%2Ffmi/lists"}