Python · Shipped
Weather Forecast App
A Streamlit app showing 1–5 day weather forecasts with temperature trends and sky conditions from OpenWeatherMap.
Repository★ 1
PythonStreamlit
A Streamlit-based web application that provides weather forecasts for any location worldwide. The app displays temperature trends and sky conditions for up to 5 days in advance.
Features #
- Real-time weather data from OpenWeatherMap API
- Temperature visualization using Plotly
- Sky condition display with custom icons
- User-friendly interface with location search
- Forecast period selection (1-5 days)
Installation #
- Clone the repository:
git clone https://github.com/AhmadTawil1/weather-forecast.git
cd weather-forecast
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile in the project root and add your OpenWeatherMap API key:
OPENWEATHER_API_KEY=your_api_key_here
Usage #
- Start the Streamlit app:
streamlit run main.py
-
Open your web browser and navigate to the URL shown in the terminal (usually http://localhost:8501)
-
Enter a location name and select the forecast period and data type (Temperature or Sky)
Project Structure #
main.py: Main application file with Streamlit interfacebackend.py: Backend logic for fetching weather dataimages/: Directory containing weather condition iconsrequirements.txt: Project dependencies.env: Environment variables (not tracked in git)
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Author #
- Ahmad Tawil
- Email: ahmadtawil.se@outlook.com
- GitHub: AhmadTawil1