https://github.com/iyashwantsaini/weather-forecast-python
A three day weather forecast script using python and request package.
https://github.com/iyashwantsaini/weather-forecast-python
Last synced: 3 months ago
JSON representation
A three day weather forecast script using python and request package.
- Host: GitHub
- URL: https://github.com/iyashwantsaini/weather-forecast-python
- Owner: iyashwantsaini
- License: mit
- Created: 2019-08-15T13:32:10.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-20T14:09:02.000Z (over 5 years ago)
- Last Synced: 2025-01-16T22:29:23.157Z (5 months ago)
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Weather forecast python
A three day weather forecast python script.By city name
API call:
api.openweathermap.org/data/2.5/forecast?q={city name},{country code}
Parameters:
q = city name and country code divided by comma, use ISO 3166 country codesBy city ID
API call:
api.openweathermap.org/data/2.5/forecast?id={city ID}
Parameters:
id = city IDBy geographic coordinates
API call:
api.openweathermap.org/data/2.5/forecast?lat={lat}&lon={lon}
Parameters:
lat, lon coordinates of the location of your interestBy ZIP code
API call:
api.openweathermap.org/data/2.5/forecast?zip={zip code},{country code}
Parameters:
zip = zip codeFor more information go here : https://openweathermap.org/api
# Requirements
1. requests = for getting data from the api
2. pyfiglet = for large header
3. termcolor = for header color# Running Script
Run the file in console using the follwing command : python openweatherapi.py