Skip to content

Python script to Check for updates on files hosted in HTTP servers by using HTTP HEAD. The script can send email to notify (using SendGrid API)

Notifications You must be signed in to change notification settings

Hard2Borrow/check_updates_http

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Readme

This Python script checks for updates in a HTTP file by doing an HTTP HEAD request, so it doesn't need to download the entire file to check the last-updated HTTP header.

The check will be performed every 60 seconds by default.

Once there is a change this programs sends an email notifying the update.

Instalation

Libraries

pip install dotenv

pip install sendgrid

pip install pytz

SendGrid Configuration

Enviromental variables should be stored in a file called .env that should look as follows:

export SENDGRID_API_KEY='sendgrid_api_key'
export SENDGRID_FROM_EMAIL='[email protected]'
export SENDGRID_TO_EMAIL='[email protected]'

Execution

python check_updates.py "https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/678x678.jpg"

About

Python script to Check for updates on files hosted in HTTP servers by using HTTP HEAD. The script can send email to notify (using SendGrid API)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%