A sleek and responsive weather application that provides current weather information for any city worldwide. Built with Python and Streamlit.
- Real-time weather data for any city
- Clean and intuitive user interface
- Multiple city comparison
- Detailed weather information including temperature, humidity, and weather conditions
- Python 3.8 or higher
- pip (Python package manager)
- OpenWeatherMap API key (free tier available)
-
Clone the repository:
git clone https://github.com/yourusername/weather-app.git cd weather -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up your environment variables:
- Create a
.envfile in the project root - Add your OpenWeatherMap API key:
API_Key=your_api_key_here - Replace
your_api_key_herewith your actual OpenWeatherMap API key
- Create a
Run the command line version of the weather app:
python cityweather.pyLaunch the Streamlit web application:
streamlit run app.py- Launch the application using either method above
- Enter the name of a city when prompted
- View the current weather information
- (Web version) Add more cities using the input field and button
- Python 3.8+
- dotenv
- requests
- streamlit
- Weather data provided by OpenWeather
- Built with Streamlit