Skip to content

lester-liam/weather-forecast-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Forecast Email

Sends you the daily hourly forecast via email

Packages Required

Install with package manager pip if you do not have the following packages: requests and beautifulsoup4.

pip install requests
pip install beautifulsoup4

Prerequisites

Weather Data | Powered by WeatherAPI.com

Weather Information is retrieved via WeatherAPI.com using GET Requests. You'll need to sign-up for an account as you will need an access token to retrieve the weather conditions.

You can find out more about their API in their docs

SMTP Credentials

Currently, the code is set to Google's SMTP Server. However if you're using other email providers, please change the server settings.

smtp_server = 'smtp.gmail.com'
smtp_port = 465

Before Running The Code

Set your environment variables

# Environment Variables
WEATHER_API_KEY="YOUR_API_KEY"
SMTP_LOGIN_USERNAME="USERNAME"
SMTP_LOGIN_PASSWORD="PASSWORD"

Update your recipient/receiver address

# Change to your email
recipient_email="your_email@example.com",

License

Unlicense

About

Sends you the daily hourly forecast via email

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages