Skip to content

🌦️ A beginner-friendly Python CLI app that fetches real-time weather data for any city using the OpenWeatherMap API

License

Notifications You must be signed in to change notification settings

ajay-techspace/weather_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌦️ Weather CLI App (Python)

A simple Python command-line app that fetches the current weather for any city using the OpenWeatherMap API.
It is secure, beginner-friendly, and built using clean Python practices with environment variable support.


πŸš€ Features

  • βœ… Real-time weather using city name
  • βœ… Metric temperature (Β°C)
  • βœ… Handles invalid city names
  • βœ… Uses .env for API key security
  • βœ… Works on any terminal or shell

πŸ“¦ Requirements

  • Python 3.7 or higher
  • requests
  • python-dotenv

πŸ› οΈ Setup Instructions

πŸ”Ή 1. Clone this project

git clone https://github.com/ajay-techspace/weather_app.git
cd weather_app

#(Optional)Create a virtual environment
python -m venv .venv
source .venv/bin/activate        # On Linux/macOS
# OR
.venv\Scripts\activate           # On Windows

#install dependencies
pip install -r requirements.txt

#Run the app
python weather.py


## πŸ§ͺ Sample Output

*** Get Current Weather Conditions ***

Please Enter a city name: chennai

Current Weather for Chennai:

The temp is 30.5Β°C

πŸ“œ License

This project is licensed under the MIT License.
You're free to use, modify, and distribute it β€” even commercially.

See the full license in the LICENSE file.

About

🌦️ A beginner-friendly Python CLI app that fetches real-time weather data for any city using the OpenWeatherMap API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages