Track flights to help plan vacation or small trips
Create a tool to track flights listed in an online spreadsheet, compare with a maximum cost and print a message if lower prices are found, including: cost, origin, destination and dates.
Note: Twilio module is not active, but the module notification.py allows sending SMS via Twilio.
Use links below and create a Kiwi account. No need for a paid account.
Resources:
Create a google spreadsheet:
- Using google sheets to read, write and append data. Not an easy task and demanded a lot of searching the web to be able to interface with google sheets. Finally found a good video on Youtube in this link.
The google spreadsheet must have a tab named 'Flight_Wishlist' which must contain the following headers:
- Destination: with destination city, airport or country name.
- Type: identifying whether 'Destination' contains a city, airport or country.
- IATA_Code: this field can remain blank and is populated by the script.
- Max_Price: populate it if the max price for the flight price search. If no lower price is found, returns blank.
Once this step is complete you should also have a credentials.json saved to your folder, carrying your own data.
On main.py, update the following:
- Update the value of
SPREADSHEET_IDto your own google spreadsheet. Onflight_data.py, update the following: - Update
KIWI_API_KEYto your own Kiwi api key. Be careful not to share your key on the web!