Sends you the daily hourly forecast via email
Install with package manager pip if you do not have the following packages: requests
and beautifulsoup4
.
pip install requests
pip install beautifulsoup4
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
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
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",