/flight-info-retriver

Python script offers a straightforward solution for locating flights based on user-specified criteria, including the origin city, destination city, and departure time. It harnesses the power of the AviationStack API to seamlessly retrieve accurate flight data.

Primary LanguagePython

Flight Information Retriever

This Python script allows you to retrieve scheduled flight information between two airports on a specific date using the AviationStack API. You can enter the origin airport code, destination airport code, and date to get detailed flight information.

Prerequisites

Before running the script, you need to obtain an API key from AviationStack. You can sign up and get your API key here.

Installation

  1. Clone this repository to your local machine:
      git clone https://github.com/Jawabreh0/Flight-Info-Retriver.git
  1. Navigate to the repository directory:
      cd Flight-Info-Retriver
  1. Install the required Python libraries (requests):
      pip install requests

Usage

  1. Open the main.py file in a text editor.

  2. Replace "YOUR_KEY_HERE" in the main() function with your AviationStack API key.

  3. Save the file.

  4. Run the script:

      python main.py
  1. Follow the prompts to enter the origin airport code, destination airport code, and date (in DD-MM-YYYY format).

  2. The script will make an API request to AviationStack and display the scheduled flight information

Example

Here's an example of how to use the script:

Enter the origin airport code (e.g., JFK): AMM
Enter the destination airport code (e.g., LAX): IST
Enter the date (DD-MM-YYYY): 01-02-2024