Skip to content

Commit 8136ae8

Browse files
committed
add readme
1 parent 52ceb76 commit 8136ae8

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

Weather Alert/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Weather Alert Script 🌦️
2+
3+
A simple Python script that fetches weather data for your city and alerts you if the temperature or wind speed crosses your set thresholds. Perfect for staying on top of weather changes and preparing for unexpected conditions! 🚀
4+
5+
## Features
6+
7+
- **Fetch Weather Data**: Retrieves up-to-date weather information for any city using the OpenWeatherMap API.
8+
- **Custom Alerts**: Set your own temperature and wind speed thresholds. If the weather conditions exceed these, the script will alert you!
9+
- **Hourly Updates**: The script automatically checks the weather every hour, so you’re always in the loop.
10+
11+
## Getting Started
12+
13+
### Prerequisites
14+
15+
- Python 3.x
16+
- `requests` and `python-dotenv` libraries
17+
18+
Install the required libraries using:
19+
20+
```bash
21+
pip install requests python-dotenv
22+
```
23+
24+
## Setup
25+
26+
- Clone or download this repository.
27+
- Get an API key from OpenWeatherMap. (It’s free!)
28+
- Create a .env file in the root directory and add your API key like shown in `.env.example`
29+
- Run the script
30+
31+
```
32+
python weather_alert.py
33+
```
34+
35+
## Troubleshooting
36+
37+
- Missing API Key Error: Double-check that your .env file contains the correct OPEN_WEATHER_MAP_API_KEY. Make sure there are no typos or extra spaces.
38+
- Error fetching data: This could happen if the API key is incorrect or if the city name is misspelled. Verify both and try again.

0 commit comments

Comments
 (0)