{"id":30939183,"url":"https://github.com/imranc07/python-live-weather-fetcher","last_synced_at":"2026-05-18T04:40:04.706Z","repository":{"id":313550125,"uuid":"1051814984","full_name":"imranc07/python-live-weather-fetcher","owner":"imranc07","description":"Python script to fetch and display live weather data for cities using OpenWeatherMap API, with JSON output and formatted terminal reports","archived":false,"fork":false,"pushed_at":"2025-09-06T19:31:15.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T21:29:37.703Z","etag":null,"topics":["datetime","formatted-output","json","live-data","openwheatherapi","python","requests-module"],"latest_commit_sha":null,"homepage":"https://openweathermap.org/api","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imranc07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T19:20:34.000Z","updated_at":"2025-09-06T19:31:18.000Z","dependencies_parsed_at":"2025-09-06T21:29:39.206Z","dependency_job_id":"99ec358e-8c52-4ab7-9faa-3c335f6bf132","html_url":"https://github.com/imranc07/python-live-weather-fetcher","commit_stats":null,"previous_names":["imranc07/python-live-weather-fetcher"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/imranc07/python-live-weather-fetcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranc07%2Fpython-live-weather-fetcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranc07%2Fpython-live-weather-fetcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranc07%2Fpython-live-weather-fetcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranc07%2Fpython-live-weather-fetcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imranc07","download_url":"https://codeload.github.com/imranc07/python-live-weather-fetcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranc07%2Fpython-live-weather-fetcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33165117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["datetime","formatted-output","json","live-data","openwheatherapi","python","requests-module"],"created_at":"2025-09-10T19:10:05.788Z","updated_at":"2026-05-18T04:40:04.670Z","avatar_url":"https://github.com/imranc07.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌤️ Weather Info Fetcher\n\n## 📌 Problem Statement\nCreate a Python script that fetches and displays live weather info for a city using the OpenWeatherMap API and saves the extracted data into a JSON file.\n\n---\n\n## 📖 Features\n- Fetches **live weather data** from OpenWeatherMap API.\n- Displays formatted weather information including:\n  - 🌡️ Temperature\n  - 🤔 Feels Like temperature\n  - 💧 Humidity\n  - ☁️ Condition\n  - 💨 Wind Speed\n  - 🧭 Pressure\n  - 📅 Timestamp when data was fetched\n- Saves extracted weather data into a **JSON file** per city.\n- Supports **single city (user input)** and **multiple cities (predefined list)**.\n\n---\n\n## ⚙️ Requirements\n- Python 3.x\n- `requests` library\n- OpenWeatherMap API key (get one for free: [https://openweathermap.org/api](https://openweathermap.org/api))\n\nInstall dependencies:\n```bash\npip install requests\n```\n---\n\n🚀 Setup \u0026 Run Instructions\n\n- Clone or download the project folder.\n\n- Open terminal/command prompt and navigate to the project folder.\n\n- Replace the placeholder API key in weather.py with your own OpenWeatherMap API key.\n\n- Run the script:\n  ```bash\n  python weather_app.py\n  ```\n- Check the output:\n- Terminal will display formatted weather reports.\n- JSON files (e.g., Delhi_weather.json) will be saved automatically in the same folder.\n\n---\n\n## 🚀 Usage\n\n### Option 1: Single City (User Input)\nUncomment these lines in the script:\n```python\ncity_from_user = input(\"Enter your city name: \")\nget_weather(city_from_user)\n```\n\n### Option 2: Multiple Cities (Predefined List)\nModify the list in the script:\n```python\ncities = [\"Mumbai\", \"Delhi\", \"London\", \"New York\"]\nfor city in cities:\n    get_weather(city)\n```\n\n---\n\n## 📂 Project Structure\n```\nWeather-Info-Fetcher/\n│-- weather_app.py        # Main Python script\n│-- README.md             # Documentation\n│-- Mumbai_weather.json   # Example saved weather data\n│-- Delhi_weather.json    # Example saved weather data\n│-- London_weather.json   # Example saved weather data\n│-- New York_weather.json # Example saved weather data\n```\n\n---\n\n## 💾 Output Example (Saved JSON)\nExample saved JSON (`Delhi_weather.json`):\n```json\n{\n    \"city\": \"Delhi\",\n    \"temperature (C)\": 29.08,\n    \"feels_like (C)\": 33.09,\n    \"humidity (%)\": 71,\n    \"condition\": \"Scattered clouds\",\n    \"wind_speed (m/s)\": 3.31,\n    \"pressure (hPa)\": 1005,\n    \"fetched_at\": \"2025-09-07 00:17:21\"\n}\n```\n\n---\n\n## 🖥️ Sample Terminal Output\nBelow is an example of the formatted weather report displayed in the terminal:\n\n```\nWeather report for Delhi:\n🌡️ Temperature: 29.08 ℃\n🤔 Feels Like: 33.09 ℃\n💧 Humidity: 71 %\n☁️ Condition: Scattered clouds\n💨 Wind Speed: 3.31 m/s\n🧭 Pressure: 1005 hPa\n📅 Data Fetched At: 2025-09-07 00:17:21\n✅ Weather data saved in Delhi_weather.json\n```\n\n---\n\n## 📝 Notes\n- Replace the placeholder API key in the script with your own key.\n- Make sure you have a stable internet connection while running the script.\n\n---\n\n✅ Developed as part of a Python automation learning exercise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranc07%2Fpython-live-weather-fetcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimranc07%2Fpython-live-weather-fetcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranc07%2Fpython-live-weather-fetcher/lists"}