Skip to content

Commit 3567fe3

Browse files
committed
added Readme and images
1 parent edf9bac commit 3567fe3

File tree

5 files changed

+70
-0
lines changed

5 files changed

+70
-0
lines changed

weather_notifier/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
# Weather Notifier - README
3+
4+
## Overview
5+
The **Weather Notifier** is a Python-based GUI application built with `Tkinter`, which allows users to retrieve weather information for any city using the OpenWeatherMap API. It provides two modes of operation:
6+
- **Manual Mode**: Fetch the weather on-demand with a single click.
7+
- **Auto Mode**: Fetch the weather at regular intervals and can also run in background.
8+
9+
The app displays current weather details such as temperature, humidity, wind speed, and more in a user-friendly interface.
10+
11+
## Features
12+
- Fetch current weather for any city globally.
13+
- Switch between manual and automatic weather updates.
14+
- Display detailed weather information, including temperature, humidity, wind, and more.
15+
- Adjustable update interval when in auto mode.
16+
- Option to stop the automatic weather updates and return to the main city selection screen.
17+
18+
## Prerequisites
19+
1. Python 3.x
20+
2. The following Python libraries:
21+
- `Tkinter`
22+
- `requests`
23+
- `threading`
24+
- `geopy`
25+
- `dotenv`
26+
27+
To install the required libraries, use the following command:
28+
```bash or windows
29+
pip install -r requirements.txt
30+
```
31+
32+
## Installation and Setup
33+
1. Clone the repository or download the script.
34+
2. Set up a `.env` file in the same directory as the script, and add your OpenWeatherMap API key like so:
35+
```env
36+
OPENWEATHER_API_KEY=your_api_key_here
37+
```
38+
3. Run the script:
39+
```bash
40+
python weather_notifier.py
41+
```
42+
43+
## Usage
44+
1. **City Entry**:
45+
- Enter the name of the city for which you want to fetch the weather.
46+
47+
2. **Mode Selection**:
48+
- **Manual Mode**: Select "On-click only" to get weather updates with a button press.
49+
- **Auto Mode**: Select "Run after a fixed interval" and input an interval in seconds to get weather updates automatically at the specified interval.
50+
51+
3. **Start Notifier**:
52+
- Click the `Start Notifier` button to begin fetching weather updates.
53+
54+
4. **Stop Notifier**:
55+
- If you are in auto mode, click the `Stop Notifier` button to stop automatic updates and return to the city selection screen.
56+
57+
## Example
58+
- In manual mode, you simply input your city name and press the `Start Notifier` button to get weather information.
59+
- In auto mode, you can set an interval (e.g., 10 seconds) to fetch updates regularly, which will continue until the `Stop Notifier` button is pressed.
60+
61+
## Notes
62+
- Ensure you have a valid OpenWeatherMap API key in your `.env` file.
63+
- The app defaults to "On-click only" mode if no mode is selected.
64+
65+
## Screenshots
66+
![Main Screen](./images/box.jpg)
67+
![Error](./images/error_box.jpg)
68+
![Error](./images/automated_gui.jpg)
69+
![Error](./images/data_automated.jpg)
70+
23.7 KB
Loading

weather_notifier/images/box.jpg

20.6 KB
Loading
47.8 KB
Loading

weather_notifier/images/error_box.jpg

42.4 KB
Loading

0 commit comments

Comments
 (0)