Skip to content

arpit-k16/PROJECTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Uploading image.png…

Weatherly 🌦️

Weatherly is a simple weather forecast and rain alert web application. Users can enter a city name to get a 5-day weather forecast and check if rain is expected in that location.

Features

  • Weather Forecast: Provides a 5-day weather forecast for a specified city.
  • Rain Alert: Notifies the user if rain is expected in the selected city, suggesting them to take an umbrella if needed.
  • Text-to-Speech Alerts: Plays a verbal alert using text-to-speech functionality.

Tech Stack

Project Structure

├── static/
│   ├── images/               # Stores images like the background and icons
│   └── style.css             # Custom styles for the application
├── templates/
│   ├── home.html             # Home page template
│   ├── index.html            # Weather forecast page template
│   └── rain.html             # Rain alert page template
├── app.py                    # Main Flask application
└── README.md                 # Project documentation

Setup and Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/weatherly.git
    cd weatherly
  2. Install Dependencies: Make sure you have Python and pip installed. Install the required libraries:

    pip install flask requests pygame gTTS
  3. Set API Key: Replace the API_KEY in app.py with your own OpenWeatherMap API key.

  4. Run the Application:

    python app.py
  5. Access the App: Open your browser and go to http://127.0.0.1:5000.

Usage

  1. Weather Forecast:

    • Enter a city name in the text box and click "Get Forecast" to view a 5-day forecast.
  2. Rain Alert:

    • Enter the same city name and click "Check for Rain" to find out if rain is expected.

Configuration

Ensure the following environment variable is set for your OpenWeatherMap API key:

OPENWEATHER_API_KEY='your_api_key_here'

You can update the CSS file (style.css) under static/ for further styling customization.

Home Page

Home Page

Weather Forecast

Weather Forecast Weather Forecast

Rain Alert

Rain Alert

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published