mirajus-salehin / weatherpy

Command line utility for fetching weather information from https://openweathermap.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weatherpy

Command line utility for fetching weather information from https://openweathermap.org

How to use

  1. Go to Open Weather and sign up for a new API key
  2. Clone the repo
  3. Open API.py and insert your API key
  4. Insert your city name and ISO-3166 country code
  5. Now simply run main.py

Requirements

Python 3.6 or higher

Running the application

git clone https://github.com/mirajus-salehin/weatherpy.git
cd weatherpy
python main.py

Adding to command line

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

About

Command line utility for fetching weather information from https://openweathermap.org


Languages

Language:Python 100.0%