Skip to content

Latest commit

 

History

History
101 lines (74 loc) · 2.62 KB

README.md

File metadata and controls

101 lines (74 loc) · 2.62 KB

Weather App 🌤️

A simple and responsive weather app that fetches real-time weather data for any city using the OpenWeatherMap API. Built with Python, HTML, CSS, and JavaScript, this app is designed to look modern and work seamlessly.


🌟 Features

  • Fetches current weather details for any city worldwide.
  • Displays weather description and temperature in Celsius.
  • Responsive and user-friendly design.
  • Built with a Python backend and a clean frontend.

🛠️ Technologies Used

  • Backend: Python (requests library)
  • Frontend: HTML, CSS, JavaScript
  • API: OpenWeatherMap

⚙️ Prerequisites

  • Python 3 installed on your system.
  • A valid API key from OpenWeatherMap.

🚀 How to Run Locally

Step 1: Clone the Repository

git clone https://github.com/your-username/weather-app.git
cd weather-app

Step 2: Set Up the Backend

  1. Open the Python file (weather.py).
  2. Replace API_KEY with your OpenWeatherMap API key.
  3. Run the backend script:
    python weather.py

Step 3: Set Up the Frontend

  1. Serve the HTML file locally using Python's HTTP server:
    python -m http.server
  2. Open your browser and navigate to:
    http://localhost:8000
    

Step 4: Use the App

  1. Enter a city name in the input box.
  2. Click Get Weather to fetch and display the current weather and temperature.

📂 Project Structure

weather-app/
├── index.html       # Main HTML file for the frontend
├── styles.css       # CSS for styling the app
├── script.js        # JavaScript for API calls and user interaction
├── weather.py       # Python script for backend functionality
└── README.md        # Documentation file

📸 Screenshots

Input City Name

Input City Name

Weather Display

Weather Display


🚀 Future Improvements

  • Add more weather details like humidity, wind speed, and forecast.
  • Enhance the app with geolocation support to detect the user's location.
  • Add error handling for various edge cases.
  • Make it a fully-fledged web application using Flask or Django.

📜 License

This project is licensed under the MIT License.
Feel free to use, modify, and distribute it.


🤝 Contributions

Contributions are welcome!
If you have any ideas or improvements, feel free to submit a pull request.