This project involves building a professional weather web app using Flask, integrating the OpenWeatherMap API, and deploying the app to Heroku. The app allows users to input a city, state, and country to retrieve current weather information. This sprint emphasizes setting up a robust CI/CD pipeline and ensuring high test coverage for the application.
- Search weather data by city, state, and country
- Display real-time weather information including:
- Temperature (in Celsius)
- Weather conditions with icons
- Feels like temperature
- Wind speed, humidity, visibility, pressure, and dew point
- Error handling for incorrect or incomplete user inputs
- Simple Bootstrap-based dashboard for a clean and responsive UI
- Python 3.8 or higher
- OpenWeatherMap API Key (Sign up here)
- Heroku account (Sign up here)
- GitHub account
-
Clone the repository:
git clone <your-repository-url> cd <repository-directory>
-
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.envfile in the project root and add your API key:WEATHER_KEY=your_api_key_here
- Create a
-
Run the application:
flask run
Access the app at
http://localhost:5000