/Rain_Check

Sends SMS alert to the user in the event of bad weather, such as rain or snow for the following day.

Primary LanguagePython

RainCheck

Rainy image

Project Description


This project sends an SMS alert to the user in the event of bad weather, such as rain or snow for the following day.

Packages


To install the required packages from the command line, execute the following command as it contains all the packages that have been used in the requirements.txt file.

pip install -r requirements.txt

APIs

Weather data through OpenWeatherMap API.
SMS Texts sent using the Twilio API.

Usage


  1. Create a OpenWeatherMap account
    1. Create an API Key and save to your .env.text file.
    2. Use the os module to access your API key from the .env.text file.
  2. Create a Twilio account
    1. Verify your account with your phone number.
    2. Create a twilio phone number from the console panel.
    3. From the console panel, copy and paste your account_sid and your authentication token to your .env with variable names of ACC_SID and AUTH_TOKEN and retrieve the values using the os module in your main.py.
  3. Use latlong.net to get your latitude and longitude of your city, then edit the LAT, LONGvariables in main.py with your latitude and longitude data.

Note


You can bypass the use of environment variables in this project and assign your personal details as string values if you only intend to use the project on your local machine. However, it's important to be aware of the risks of publishing your personal details on the internet.

Alternatively


You can use PythonAnyWhere to schedule a task that runs every day on specific hour.

Finally


I appreciate you taking the time to read and view this project. Please take care and stay safe.