A simple Python application that fetches and displays real-time weather information for any city using the OpenWeatherMap API.
- Get current weather information for any city
- Display temperature in Celsius
- Show current weather conditions
- Simple command-line interface
- Uses real-time data from the OpenWeatherMap API
- Python 3
- Requests library
- OpenWeatherMap API
WeatherAppUsingAPI/
│
├── weather_app.py
├── README.md
└── requirements.txt
Before running this project, ensure you have:
- Python 3 installed
- An active internet connection
- An OpenWeatherMap API key
- Visit https://openweathermap.org/
- Create an account or log in.
- Navigate to the API Keys section.
- Generate a new API key.
- Wait for the key to become active (it may take some time).
- Clone this repository:
git clone https://github.com/your-username/WeatherAppUsingAPI.git- Navigate to the project directory:
cd WeatherAppUsingAPI- Install the required dependencies:
pip install requests-
Open the
weather_app.pyfile. -
Replace the placeholder API key with your own:
API_KEY = "YOUR_API_KEY"- Run the application:
python3 weather_app.py- Enter the city name when prompted:
Enter city name: Lucknow
Enter city name: Lucknow
Weather in Lucknow:
Temperature: 39.1°C
Condition: broken clouds
- Display humidity and wind speed
- Show "feels like" temperature
- Add support for multiple city searches
- Improve error handling
- Create a graphical user interface (GUI)
Contributions, issues, and feature requests are welcome.
This project is open-source and available under the MIT License.
Made with ❤️ using Python and OpenWeatherMap API.