A simple weather application developed in Python that allows you to get current weather data, forecast, and view information about the PM Accelerator.
- Get current weather by city name.
- View a 5-day weather forecast by city name.
- Retrieve weather information by latitude and longitude.
- Convert an address to latitude and longitude for location-based weather.
- Information button providing a description of the PM Accelerator.
-
Clone the Repository:
- Open a terminal or command prompt.
- Run the following command to clone the repository to your local machine:
git clone https://github.com/sara-kaz/Weather-App.git
-
Navigate to the Repository Folder:
- Change into the directory of your repository:
cd Weather-App
- Change into the directory of your repository:
-
Create a Virtual Environment:
python3 -m venv venv
-
Activate the Virtual Environment:
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install Required Packages:
- Ensure Python is installed.
- Use
pip
to install the necessary libraries:pip install requests Flask
-
Start the Application:
- In your terminal, navigate to the directory where
WeatherApp.py
is located, and run the script:python WeatherApp.py
- In your terminal, navigate to the directory where
-
Access the Application:
- Open your web browser and visit
http://127.0.0.1:5000
to view and interact with the app.
- Open your web browser and visit
-
Check Current Weather:
- Enter a city name in the input field and click "Get Weather" to retrieve the current weather details.
-
View 5-Day Forecast:
- Enter a city name and click "Get Forecast" to view the 5-day weather forecast.
-
Search by Location:
- Enter latitude and longitude coordinates and click "Get Weather by Location" to retrieve the weather data for that location.
- Use the "Convert Address" button to obtain latitude and longitude from an address.
-
Learn About PM Accelerator:
- Click the "Info" button to view a description of the PM Accelerator program.
- Verify that entering a city name returns accurate weather data.
- Check that the 5-day forecast correctly displays for a given city.
- Ensure that searching by latitude and longitude retrieves the correct weather information.
- Test the address conversion feature for obtaining latitude and longitude coordinates.
The Product Manager Accelerator Program is designed to support PM professionals through every stage of their career. From students seeking entry-level jobs to Directors aiming for leadership roles, our program has helped hundreds of students achieve their career aspirations. For more details, visit our official website or contact our support team.
- Weather Fetching: Implemented functionality to retrieve current weather data and 5-day forecasts using the OpenWeatherMap API.
- Search by Coordinates: Added the ability to search for weather using latitude and longitude coordinates, with address-to-coordinates conversion.
- PM Accelerator Info: Integrated a section to display information about the Product Manager Accelerator program.
- Error Handling: Included error handling to display appropriate messages if the weather data cannot be retrieved.
- UI Design: Created a user-friendly HTML interface with CSS for styling and used FontAwesome for icons.