https://github.com/nature1995/weather-forecast-alert
🌈☁️Weather forecasts with chart display and notifications
https://github.com/nature1995/weather-forecast-alert
Last synced: 4 months ago
JSON representation
🌈☁️Weather forecasts with chart display and notifications
- Host: GitHub
- URL: https://github.com/nature1995/weather-forecast-alert
- Owner: nature1995
- License: mit
- Created: 2019-03-02T01:39:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-27T15:35:12.000Z (almost 3 years ago)
- Last Synced: 2025-03-25T11:12:08.747Z (7 months ago)
- Language: Python
- Homepage: https://www.ranxiaolang.com/weather
- Size: 5.41 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# weather-forecast-alert
[](https://travis-ci.com/nature1995/weather-forecast-alert)
## Introduction
This Django web app can provide weather forecasts with chart display and notifications.## Features
- [x] Choose the city to get weather
- [X] Display current weather condition
- [X] Display current city map
- [x] Display Forecast as a chart(5 day / 3 hour forecast)
- [x] Set email notifications to notify the user if the temperature is below 45 °F## Demo
https://www.ranxiaolang.com/weather
If you find the online demo do not work, please follow the next part to run the code local.
## Run the code local:
1. Clone this repository:
```
git clone https://github.com/nature1995/weather-forecast-alert.git
```
2. Enter into `weather-forecast-alert` folder, set up virtual environment with **python 3.6** and install packages.
```
cd weather-forecast-alert
pip3 install -r requirements.txt
```
3. Update API keyOpenWeatherMap API key:
OWM_API_KEY: `./weather-forecast-alert/apps/weather/views.py`Email key: (See email to find the latest key)
EMAIL_HOST_PASSWORD: `./weather-forecast-alert/Weather/settings.py`4. Run server on your own computer:
```
python manage.py runserver 0.0.0.0:8000
```
5. Access though browser
```
http://127.0.0.1:8000
or
http://0.0.0.0:8000
```## Result
1. Weather forecasts with chart display![]()
![]()
![]()
2. Notifications though email
![]()
![]()
3. Show figure with Smoothed Line Chart or Histogram
![]()
![]()
#### Notice:
OpenWeatherMap API key:
OWM_API_KEY: `./weather-forecast-alert/apps/weather/views.py`Google Map API key:
GOOGLE_MAP_KEY: `./weather-forecast-alert/apps/weather/views.py`Set your Email:
Location: `./weather-forecast-alert/Weather/setting.py`
```
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.exmail.qq.com'
EMAIL_PORT = 465 # Your send port
EMAIL_HOST_USER = 'weather@ranxiaolang.com'
EMAIL_HOST_PASSWORD = 'Your Password' # Use the dedicate password not your email password
EMAIL_USE_SSL = True # SSL or TSL depend on email provider
```## Author
[nature1995](https://github.com/nature1995) | Ziran Gong