Table of Contents
Are you weary of visiting multiple websites daily just to see if there are any enticing flight deals available?
This script uses APIs to search for flight deals from a list of cities and notifies the user via SMS if a deal is found with a price lower than the specified amount.
With this, you can define a date range, specify the cities you want to visit, and let the script work for you.
Note: Before running this script, ensure that the necessary credentials and environment variables are properly configured for accessing the Google Sheets, Sheety, Tequila and Twilio API.
To use the Script:
- Python: https://www.python.org/downloads/
- Pip: https://pip.pypa.io/en/stable/installation/
- Git: https://git-scm.com/downloads
To use the APIs:
- Create a free account on Sheety: https://sheety.co/
- Create a free account on Tequila: https://tequila-api.kiwi.com
- Create a free account on Twilio: https://www.twilio.com/
-
Clone the repo.
git clone https://github.com/sschuckk/flight-deals-notifier.git
-
Install the packages according to the configuration file requirements.txt.
pip install -r requirements.txt
-
Download the flight deals sheet file and upload it to your Google Docs. https://github.com/sschuckk/flight-deals-notifier/blob/main/data/flight_deals.xlsx
-
Use your API credentials in these variables:
data_manager.py SHEETY_ENDPOINT flight_search.py TEQUILA_ENDPOINT TEQUILA_API_KEY notifier_manager.py TWILIO_SID TWILIO_AUTH_TOKEN TWILIO_VIRTUAL_NUMBER TWILIO_VERIFIED_NUMBER
Note: Create an .env file in the root of project and add your credentials e sensitive content to these variables.
The project can be run by a terminal or directly in your favorite IDE. You can configure a task scheduler on Windows/Linux to run the script daily to get the best offers. I recommend to use https://www.pythonanywhere.com/ to execute the script remotely.
-
- Define the date range for flight searches. Use just one start/end date for all search.
- Define the City Origen. One city per row, multiple cities per column.
- All City Origen will be used against all City destination.
- Define the City Destination. One city per row, multiple cities per column.
- Don't worry if you don't know each Code. The script will find it for you.
- Define the Lowest price for each City Destination.
- If a flight is found with a price lower than the specified lowest price the SMS will be sent.
Note: The spreadsheet doc contains the description of each column.
-
For a simples execution:
python main.py
Logs printed-out on terminal:
SMS received on smartphone:
- Send Whatsapp messages
- Send Email messages
- Create a link direct to the deals
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/NewFeature
) - Commit your Changes (
git commit -m 'Add some new feature'
) - Push to the Branch (
git push origin feature/NewFeature
) - Open a Pull Request
Distributed under the MIT License. It’s free, no legal restrictions, why not try it out?