{"id":15009805,"url":"https://github.com/davecom/pyweatherkit","last_synced_at":"2026-03-27T02:11:25.201Z","repository":{"id":44158546,"uuid":"511386048","full_name":"davecom/PyWeatherKit","owner":"davecom","description":"A simple Python wrapper for Apple's WeatherKit REST API.","archived":false,"fork":false,"pushed_at":"2023-05-25T06:12:55.000Z","size":24,"stargazers_count":26,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-08T03:37:40.255Z","etag":null,"topics":["python","python3","weather","weatherkit","weatherkit-rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davecom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null}},"created_at":"2022-07-07T04:47:32.000Z","updated_at":"2025-02-19T06:56:50.000Z","dependencies_parsed_at":"2023-12-13T05:32:30.152Z","dependency_job_id":"7919b619-0590-40d7-aabc-a971cb1c0a7f","html_url":"https://github.com/davecom/PyWeatherKit","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"dc102097b2c486e815bcccaf84f4355b01bb9a6a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FPyWeatherKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FPyWeatherKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FPyWeatherKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FPyWeatherKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davecom","download_url":"https://codeload.github.com/davecom/PyWeatherKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248083153,"owners_count":21045051,"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":["python","python3","weather","weatherkit","weatherkit-rest-api"],"created_at":"2024-09-24T19:28:42.259Z","updated_at":"2026-03-27T02:11:25.126Z","avatar_url":"https://github.com/davecom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyWeatherKit\nA simple Python wrapper for [Apple's WeatherKit REST API](https://developer.apple.com/documentation/weatherkitrestapi).\n\nYou need an Apple developer account to use this library and you should first follow the [setup instructions](https://developer.apple.com/documentation/weatherkitrestapi/request_authentication_for_weatherkit_rest_api) in their documentation.\n\nIt has a simple interface for retrieving a raw dictionary of weather data from the API, and a method for retrieving simplified daily forecasts as Pythonic objects. Pull requests are welcome!\n\n## Install\n\n```bash\npip install pyweatherkit\n```\n\n## Simple Forecast Usage\n\n```python\nfrom weatherkit.client import WKClient \nclient = WKClient(\"YOUR TEAM ID\", \"YOUR SERVICE ID\", \"YOUR KEY ID\", \"PATH TO YOUR PRIVATE KEY FILE\")\nforecast = client.get_simple_forecast(latitude, longitude)\nfor day in forecast:\n    print(f\"{day.day_of_week}: {day.daytime_icon} with a high of {round(day.temperature_high)} and a low of {round(day.temperature_low)}\")\n```\n\nAssuming you input all of the correct client authentication parameters and a valid latitude and longitude, this should result in something like:\n\n```bash\nThursday: 🌤️ with a high of 38 and a low of 23\nFriday: 🌧️ with a high of 45 and a low of 22\nSaturday: 🌧️ with a high of 67 and a low of 40\n...\n```\n\n## Pulling Full Data Sets\n\n```python\nfrom weatherkit.client import WKClient \nclient = WKClient(\"YOUR TEAM ID\", \"YOUR SERVICE ID\", \"YOUR KEY ID\", \"PATH TO YOUR PRIVATE KEY FILE\")\nres = client.get_weather(44.50572, -73.24026)\n```\n\nYou can also specify the language of the response, the timezone, and the specific datasets you need.\n\n### Historical Data Pull \nOnly available from dates after 08/01/2021 (as of 2023-03-23)\n```python\nfrom weatherkit.client import WKClient\nfrom datetime import datetime\n\n# Set dates \ndailyStart = datetime.strptime(\"2022-11-29\", \"%Y-%m-%d\")\ndailyEnd = datetime.strptime(\"2022-11-30\", \"%Y-%m-%d\")\ncurrentAsOf = datetime.strptime(\"2022-11-29\", \"%Y-%m-%d\")\n\nclient = WKClient(\"YOUR TEAM ID\", \"YOUR SERVICE ID\", \"YOUR KEY ID\", \"PATH TO YOUR PRIVATE KEY FILE\")\nres = client.get_weather(44.50572, -73.24026, dailyStart=dailyStart, dailyEnd=dailyEnd, currentAsOf=currentAsOf)\n```\n\n## Test/Example Program\n\nTry running simple_test.py from the same directory as this package.\n\n```bash\npython3 simple_test.py your_team_id your_service_id your_key_id your_key_path your_latitude your_longitude\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavecom%2Fpyweatherkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavecom%2Fpyweatherkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavecom%2Fpyweatherkit/lists"}