Skip to content

A Python application using the OpenWeatherMap API to display current weather details for a city. Built with a user-friendly GUI.

License

Notifications You must be signed in to change notification settings

alihadimoghadam/WeatherApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

A simple weather application that provides current weather information for a given city. It retrieves weather data from the OpenWeatherMap API and displays the temperature, humidity, and weather description.

Features

  • Get the current weather information for a city
  • Display temperature in Celsius or Fahrenheit
  • User-friendly graphical user interface (GUI)

Prerequisites

  • Python 3.7 or above
  • Requests library: Install it using pip install requests
  • Tkinter library (usually included with Python)

Getting Started

  1. Clone the repository or download the project files.

  2. Obtain an API key from OpenWeatherMap:

    • Visit the OpenWeatherMap website: https://openweathermap.org/
    • Sign up for a free account or log in if you already have one.
    • Navigate to your account dashboard and find your API key.
  3. Open the app.py file in a text editor.

  4. Replace "YOUR_API_KEY" in the fetch_weather_data function with your actual OpenWeatherMap API key.

  5. Save the file.

Usage

  1. Open a terminal or command prompt and navigate to the project directory.

  2. Run the following command to start the application: python app.py

  3. The Weather App window will open.

  4. Enter the name of a city in the text field.

  5. Choose the desired temperature units (Celsius or Fahrenheit) using the radio buttons.

  6. Click the "Get Weather" button.

  7. The current weather information for the specified city will be displayed below.

  8. To check the weather for another city, repeat steps 4-7.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or submit a pull request.

About

A Python application using the OpenWeatherMap API to display current weather details for a city. Built with a user-friendly GUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages