Command line utility for fetching weather information from https://openweathermap.org
- Go to Open Weather and sign up for a new API key
- Clone the repo
- Open
API.py
and insert your API key - Insert your city name and ISO-3166 country code
- Now simply run
main.py
Python 3.6 or higher
git clone https://github.com/mirajus-salehin/weatherpy.git
cd weatherpy
python main.py
Add this line to your .bashrc
or .zshrc
file
export WEATHERPY_API_KEY="<YOUR_API_KEY>"
export WEATHERPY_COUNTRY_CODE="<COUNTRY_CODE"
export WEATHERPY_CITY_NAME="<CITY_NAME>"
export WEATHERPY_UNITS="metric"
alias weatherpy='cd <YOUR_CLONED_DIRECTORY> && python main.py'
After this open your terminal and type weatherpy