{"id":21346651,"url":"https://github.com/manucabral/py-smn","last_synced_at":"2025-03-16T03:43:44.345Z","repository":{"id":65230344,"uuid":"588681617","full_name":"manucabral/py-smn","owner":"manucabral","description":"Servicio Meteorológico Nacional Argentina (SMN) weather and forecast service made in Python.","archived":false,"fork":false,"pushed_at":"2023-03-23T03:43:59.000Z","size":38,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T16:27:48.798Z","etag":null,"topics":["api-client","api-wrapper","argentina","forecast-argentina","python","smn","weather","weather-api"],"latest_commit_sha":null,"homepage":"","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/manucabral.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,"governance":null}},"created_at":"2023-01-13T18:14:32.000Z","updated_at":"2024-03-26T13:37:07.000Z","dependencies_parsed_at":"2023-02-10T11:15:35.299Z","dependency_job_id":"6d1d98ee-150d-426d-addf-09a9b40adf47","html_url":"https://github.com/manucabral/py-smn","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":"0.18604651162790697","last_synced_commit":"9a0f00c40cee07ae3843ae1c4d72f29118488c3d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manucabral%2Fpy-smn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manucabral%2Fpy-smn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manucabral%2Fpy-smn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manucabral%2Fpy-smn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manucabral","download_url":"https://codeload.github.com/manucabral/py-smn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822277,"owners_count":20353499,"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":["api-client","api-wrapper","argentina","forecast-argentina","python","smn","weather","weather-api"],"created_at":"2024-11-22T02:09:58.961Z","updated_at":"2025-03-16T03:43:44.324Z","avatar_url":"https://github.com/manucabral.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-smn\nA free and open source Python library for retrieving weather data from the National Meteorological Service of Argentina (SMN). \n\n## Note\nThis package offers two ways to obtain the requested data, the first is through the [API](https://ws.smn.gob.ar) of SMN and the second is by the public data offered by the official SMN [website](https://www.smn.gob.ar/descarga-de-datos). I recommend you use the second option since it is more accurate and is updated every day.\n\n\n## Installation\nFrom PyPI\n```bash\npip install py-smn\n```\nFrom source code clone it\n```bash\ngit clone https://github.com/manucabral/py-smn.git\ncd py-smn\npython -m pip install -r requirements.txt\n```\n\n\n## Usage\nUsing static (recommended method)\n```py\nimport asyncio\nimport smn\n\nasync def main():\n    async with smn.Client() as client:\n        forecast_now = await client.get_static()\n        province, lat, lon = await client.get_location()\n        nearest_forecast = forecast_now.nearest(lat, lon)\n        print(nearest_forecast.weather['temp'])\n\nif __name__ == '__main__':\n    asyncio.run(main())\n```\n\nUsing API\n```py\nimport asyncio\nimport smn\n\nasync def main():\n    async with smn.Client() as client:\n        forecast_now = await client.get(forecast='now')\n        weather_stations = forecast_now.filter(province='Buenos Aires', name='La Plata')\n        for weather_station in weather_stations:\n            print(weather_station.name, weather_station.weather['temp'])\n\nif __name__ == '__main__':\n    asyncio.run(main())\n```\n\n## Constributions\nAll constributions, bug reports or fixes and ideas are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanucabral%2Fpy-smn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanucabral%2Fpy-smn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanucabral%2Fpy-smn/lists"}