Skip to content

This script searches for flight deals from a list of cities using APIs and notifies the user smarthphone by SMS.

License

Notifications You must be signed in to change notification settings

sschuckk/flight-deals-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Flight Deal Notifier Script


Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

About The Project

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.

Built With

Python

(back to top)

Getting Started

Prerequisites

To use the Script:

To use the APIs:

Installation

  1. Clone the repo.

    git clone https://github.com/sschuckk/flight-deals-notifier.git
  2. Install the packages according to the configuration file requirements.txt.

    pip install -r requirements.txt
  3. 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

  4. 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.

    (back to top)

Usage

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.

  1. Configure the Google Sheets: Product presentation

    • 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.

  2. For a simples execution:

    python main.py

Output:

Logs printed-out on terminal:

Product presentation

SMS received on smartphone:

Product presentation

(back to top)

Roadmap

  • Send Whatsapp messages
  • Send Email messages
  • Create a link direct to the deals

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/NewFeature)
  3. Commit your Changes (git commit -m 'Add some new feature')
  4. Push to the Branch (git push origin feature/NewFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. It’s free, no legal restrictions, why not try it out?

(back to top)

About

This script searches for flight deals from a list of cities using APIs and notifies the user smarthphone by SMS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages