Skip to content

Burak3405/Python_weather_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desktop Weather Application

A desktop weather application built with Python and PyQt6. This application allows users to search for a city by name and view the current temperature along with a dynamic weather emoji representing the sky conditions.

Weather App Screenshot

Features

  • Real-Time Data: Fetches live weather data using the OpenWeatherMap API.
  • Two-Step API : Utilizes the Geocoding API to convert city names into exact coordinates (lat/lon) before calling the Current Weather Data API.
  • Dynamic UI: Features a clean, custom-styled graphical user interface built with PyQt6.
  • Smart Emojis: Automatically updates the weather emoji (⛈️, 🌧️, ☀️, ☁️, etc.) based on the specific weather condition ID returned by the API.
  • Error Handling: Comprehensive try-except blocks and match-case structures to handle HTTP errors (401, 404, 500, etc.), invalid city names, and connection timeouts gracefully without crashing.

Technologies Used

  • Python 3
  • PyQt6 (GUI)
  • Requests (HTTP library)
  • Python-dotenv (Env management)
  • uv (Fast Python package installer and resolver)

Installation & Setup

If you want to run this project locally, follow these steps:

1. Clone the repository:

2. Set up the API Key:

  • Create a free account at [OpenWeatherMap] and generate an API key.
  • Create a file named .env in the root directory of the project.
  • Add your API key to the file like this:
WEATHER_API_KEY=your_api_key_here

3. Install dependencies:

If you are using uv:

uv sync

Or if you are using standard pip:

pip install -r requirements.txt

4. Run the application:

If using uv:

uv run main.py

Or using standard

python main.py

About

A desktop weather application built with Python and PyQt6.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages