CLI-based Python tool to fetch real-time weather data using OpenWeather API with secure API key handling.
- 🔍 Get weather by city name
- 🌡️ Temperature in Celsius
- ☁️ Weather condition
- 💧 Humidity
- 🌬️ Wind speed
- 🔐 Secure API key using
.env
- Python
- requests
- python-dotenv
- CLI (sys.argv)
git clone https://github.com/aditi-1731/weather-cli.git
cd weather-cli
pip install -r requirements.txtCreate a .env file in the project root:
API_KEY=your_api_key_here
python weather.py <city>python weather.py Delhi🌡️ Temperature : 30°C
☁️ Condition : clear sky
💧 Humidity : 60%
🌬️ Wind Speed : 3.5 m/s
- Uses OpenWeather API
- Requires internet connection
- API key may take a few minutes to activate
- Add unit selection (Celsius/Fahrenheit)
- Save results to file
- Add multiple city support
- Convert into GUI/Web app
Aditi Tripathi