Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

🌦️ Project 11: Weather App (API)

Python
Requests
dotenv
API


📖 Overview

This project is a Weather App CLI that fetches real-time weather data from WeatherAPI.
It demonstrates:

  • 🌐 API integration in Python.
  • 🔑 Using environment variables (.env) for security.
  • 📊 Displaying weather details like temperature, wind, humidity, and conditions.

✨ Features

  • 🔍 Search weather by city or location.
  • 🌡️ Shows current temperature & feels-like values.
  • 🌬️ Displays wind speed and humidity.
  • ☁️ Provides weather description (e.g., "Cloudy", "Rainy").
  • 🔑 Secure API key management with dotenv.

⚙️ Tech Stack


🚀 Setup & Installation

  1. Clone the project folder:

    git clone https://github.com/your-repo/Project_11_Weather_App.git
    cd Project_11_Weather_App
  2. Install dependencies:

    pip install requests python-dotenv
  3. Get a free API key from WeatherAPI.

  4. Create a .env file in the project root:

    API_KEY=your_weatherapi_key_here

▶️ Usage

Run the app:

python weather_app.py

Example:

Enter Location: Kolkata
Weather of Kolkata, West Bengal
--------------------------------------------
Temp: 30   °C  | Feels: 33   °C |
Wind: 12   km/h|
Humidity: 78%  | description: Partly cloudy

To quit, enter:

Enter Location: q

📂 Project Structure

Project_11_Weather_App/
│── README.md
│── weather_app.py
│── .env.example

🧠 Learning Takeaway

  • ✅ Use APIs to get real-world data.
  • ✅ Always keep API keys secret with .env.
  • ✅ Handle status codes and possible API errors gracefully.