This is a Python program that uses a weather API to send daily hourly weather forecasts to your cellphone. The program is designed to send information for the city in which you are located.
The program uses the Weather API to obtain hourly weather forecasts for the city in which you are located. The information is extracted from the API and then filtered to obtain only the information that is to be sent. Then, Twilio is used to send the information to the user's cellphone.
In addition, the program is set up to run daily. This is accomplished using Amazon EC2, which allows scheduling the program execution at a specific time every day.
To use this program, you will need the following:
- A Twilio account to send text messages
- An Amazon EC2 account to schedule daily sending
- Python 3.6 or higher
- The following Python libraries:
- twilio 7.14.0
- pandas 1.3.4
- requests 2.22.0
- tqdm 4.62.3
Before you can use the program, you need to perform the following setup steps:
- Obtain a Twilio account and set it up to send text messages.
- Obtain an Amazon EC2 account and set it up to run the program daily.
- Obtain an API key from the weather API you want to use.
- Clone or download the GitHub repository and open the
twilio_config.py
file. - Set the
TWILIO_ACCOUNT_SID
,TWILIO_AUTH_TOKEN
,TWILIO_PHONE_NUMBER
,DESTINATION_PHONE_NUMBER
variables with your Twilio account values and source and destination phone numbers. - Set the
API_KEY
variable with your weather API key. - Set the
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
variables with your Amazon EC2 account access keys.
Once you have completed the setup, you can run the program going to the folder in which is, using python3 twilio_script.py
in MacOS or py twilio_script.py
in Windows.
The program will send a text message with the hourly weather forecast for the city in which you are located. It will also automatically execute every day at the time you have scheduled in Amazon EC2.