### Install pyflightdata via pip Source: https://pyflightdata.readthedocs.io/en/latest/installation.html The standard command to install the library and its dependencies. ```bash pip install pyflightdata ``` -------------------------------- ### Get airport arrivals Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves arrivals for an airport by IATA code. Optional login is shown. Supports pagination and earlier data. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_arrivals('HYD') f.get_airport_arrivals('HYD',page=1,limit=10) ``` -------------------------------- ### Get flights by search key Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_flights to retrieve up to 100 flights matching a full or partial flight number string. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_flights(‘MI47’) ``` -------------------------------- ### Get airline fleet Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_fleet with an airline key to retrieve the list of aircraft in an airline's fleet. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_fleet(‘ai-aic’) ``` -------------------------------- ### Get airport details Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves detailed information about an airport by IATA code. Optional login is shown. Supports pagination. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_details('HYD') f.get_airport_details('HYD',page=1,limit=10) ``` -------------------------------- ### Get aircraft history by tail number Source: https://pyflightdata.readthedocs.io/en/latest/quickstart.html Retrieves the last 5 flights for aircraft VT-ANL using get_history_by_tail_number. ```python # get the last 5 flights for the aircraft VT-ANL # this is an Air India aircraft api.get_history_by_tail_number('VT-ANL')[-5:] ``` -------------------------------- ### Get aircraft information by tail number Source: https://pyflightdata.readthedocs.io/en/latest/quickstart.html Retrieves information about a particular aircraft, such as its age, using get_info_by_tail_number. ```python # get the information for a particular aircraft using tail number api.get_info_by_tail_number('VT-ANL') ``` -------------------------------- ### get_countries() Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Returns a list of all countries. Can be used to get the country name/code as it is known on flightradar24. ```APIDOC ## get_countries() ### Description Returns a list of all countries. This can be used to get the country name/code as it is known on flightradar24. ### Method Function call ### Parameters None ### Returns A list of all countries ### Example ```python from pyflightdata import FlightData f=FlightData() f.get_countries() ``` ``` -------------------------------- ### Get flights between origin and destination Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_flights_from_to to retrieve upcoming scheduled flights between two airport codes. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_flights_from_to(‘SIN’,’HYD’) ``` -------------------------------- ### Get airport departures Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves departures for an airport by IATA code. Optional login is shown. Supports pagination and earlier data. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_departures('HYD') f.get_airport_departures('HYD',page=1,limit=10) ``` -------------------------------- ### get_flights(search_key) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Get the flights for a particular airline. Given a full or partial flight number string, this method returns the first 100 flights matching that string. ```APIDOC ## get_flights(search_key) ### Description Get the flights for a particular airline. Given a full or partial flight number string, this method returns the first 100 flights matching that string. ### Method Function call ### Parameters - **search_key** (str) - Required - Full or partial flight number for any airline e.g. MI47 to get all SilkAir flights starting with MI47 ### Returns A list of dicts, one for each scheduled flight in the airline's network ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_flights('MI47') ``` ``` -------------------------------- ### Get flight history by flight number Source: https://pyflightdata.readthedocs.io/en/latest/quickstart.html Retrieves the last 5 flights for flight number AI101 using get_history_by_flight_number. ```python # get the last 5 flights for AI101 f.get_history_by_flight_number('AI101')[-5:] ``` -------------------------------- ### Initialize FlightData and login Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Creates a FlightData instance and logs in with email and password. Login is optional at object creation and can be done later. ```python from pyflightdata import FlightData f=FlightData() f.login(myemail,mypassword) ``` -------------------------------- ### FlightData.__init__(email=None, password=None) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Constructor for the FlightData class, the entry point to the API. Optionally accepts email and password for login to flightradar24. ```APIDOC ## FlightData.__init__(email=None, password=None) ### Description Initializes a FlightData object. Optionally accepts email and password for login to flightradar24. ### Parameters - **email** (str) - Optional - Email ID used to login to flightradar24. - **password** (str) - Optional - Password for the user ID. ### Example ```python from pyflightdata import FlightData f=FlightData() f.login(myemail,mypassword) ``` ``` -------------------------------- ### Initialize FlightData and login Source: https://pyflightdata.readthedocs.io/en/latest/quickstart.html Initializes the FlightData class and optionally logs in to flightradar24 for paid membership. The session token is stored in FlightData.AUTH_TOKEN after login. ```python from pyflightdata import FlightData f=FlightData() f.login(foo@bar.com,foobar) ``` -------------------------------- ### Retrieve airport passenger reviews Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches passenger reviews for a given airport. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_reviews('HYD') f.get_airport_reviews('HYD',page=1,limit=10) ``` -------------------------------- ### get_history_by_tail_number(tail_number, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches the history of a particular aircraft by its tail number. Requires authentication for full data. Pagination is used; query page 1 first and increment until 0 results. Limit max is 100. ```APIDOC ## get_history_by_tail_number(tail_number, page=1, limit=100) ### Description Fetch the history of a particular aircraft by its tail number. This method can be used to get the history of a particular aircraft by its tail number. It checks the user authentication and returns the data accordingly. You need to query page 1 first, and if there are more pages then increment page number until you get 0 results back. Limit has a max value of 100. ### Method SDK Method ### Parameters - **tail_number** (str) - Required - The tail number, e.g. VT-ANL - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass in higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned (max 100) ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_tail_number('VT-ANL') f.get_history_by_tail_number('VT-ANL',page=1,limit=10) ``` ``` -------------------------------- ### get_all_available_history_by_tail_number(tail_number, delay=1) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches all available history of a particular aircraft by its tail number. Checks user authentication and returns data accordingly. ```APIDOC ## get_all_available_history_by_tail_number(tail_number, delay=1) ### Description Fetch all the available history of a particular aircraft by its tail number. This method checks the user authentication and returns the data accordingly. ### Method Function call ### Parameters - **tail_number** (str) - Required - The tail number, e.g. VT-ANL - **delay** (int) - Optional - Number of seconds delay between each check for new data, defaults to 1 second ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_all_available_history_by_tail_number('VT-ANL') f.get_all_available_history_by_tail_number('VT-ANL',delay=2) ``` ``` -------------------------------- ### get_info_by_tail_number(tail_number, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches the details of a particular aircraft by its tail number, including serial number, age, and links to images. Requires authentication for full data. ```APIDOC ## get_info_by_tail_number(tail_number, page=1, limit=100) ### Description Fetch the details of a particular aircraft by its tail number. This method can be used to get the details of a particular aircraft by its tail number. Details include the serial number, age etc along with links to the images of the aircraft. It checks the user authentication and returns the data accordingly. ### Method SDK Method ### Parameters - **tail_number** (str) - Required - The tail number, e.g. VT-ANL - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass in higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned (max 100) ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_info_by_flight_number('VT-ANL') f.get_info_by_flight_number('VT-ANL',page=1,limit=10) ``` ``` -------------------------------- ### FlightData.get_airport_arrivals(iata, page=1, limit=100, earlier_data=False) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves arrival information for an airport given its IATA code. ```APIDOC ## FlightData.get_airport_arrivals(iata, page=1, limit=100, earlier_data=False) ### Description Retrieves arrival information for an airport given its IATA code. ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD. - **page** (int) - Optional - Page number; for users on a plan with flightradar24, higher page numbers give more data. - **limit** (int) - Optional - Limit on number of records returned. - **earlier_data** (boolean) - Optional - Default false; set to true to get data from earlier in time. ### Returns A list of dicts with the data; one dict for each row of data from flightradar24. ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_arrivals('HYD') f.get_airport_arrivals('HYD',page=1,limit=10) ``` ``` -------------------------------- ### Retrieve airport weather data Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches weather information for a specified airport. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_weather('HYD') f.get_airport_weather('HYD',page=1,limit=10) ``` -------------------------------- ### Fetch flight history by tail number Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_all_available_history_by_tail_number to retrieve history for a specific aircraft tail number. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_all_available_history_by_tail_number('VT-ANL') f.get_all_available_history_by_tail_number('VT-ANL',delay=2) ``` -------------------------------- ### get_all_available_history_by_flight_number(flight_number, delay=1) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches all available history of a particular aircraft by its flight number. Checks user authentication and returns data accordingly. ```APIDOC ## get_all_available_history_by_flight_number(flight_number, delay=1) ### Description Fetch all the available history of a particular aircraft by its flight number. This method checks the user authentication and returns the data accordingly. ### Method Function call ### Parameters - **flight_number** (str) - Required - The tail number, e.g. VT-ANL - **delay** (int) - Optional - Number of seconds delay between each check for new data, defaults to 1 second ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_all_available_history_by_flight_number('6E375',delay=2) ``` ``` -------------------------------- ### login(email, password) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Login to the flightradar24 session. Obtains a token that is passed on all requests, enabling data access according to the user's plan. ```APIDOC ## login(email, password) ### Description Login to the flightradar24 session. The API currently uses flightradar24 as the primary data source. The site provides different levels of data based on user plans. For users who have signed up for a plan, this method allows to login with the credentials from flightradar24. The API obtains a token that will be passed on all the requests; this obtains the data as per the plan limits. ### Method SDK Method ### Parameters - **email** (str) - Required - The email ID which is used to login to flightradar24 - **password** (str) - Required - The password for the user ID ### Returns None (not explicitly documented) ### Example ```python from pyflightdata import FlightData f=FlightData() f.login(myemail,mypassword) ``` ``` -------------------------------- ### Fetch aircraft images by tail number Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_images_by_tail_number to retrieve images of an aircraft in various sizes. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_images_by_flight_number('VT-ANL') f.get_images_by_flight_number('VT-ANL',page=1,limit=10) ``` -------------------------------- ### Fetch flight by date Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_history_by_flight_number to retrieve flight data for a specific date in YYYYMMDD format. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_flight_number('AI101','20191116') ``` -------------------------------- ### get_history_by_flight_number(flight_number, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches the history of a flight by its number. Requires authentication for full data. Pagination is used; query page 1 first and increment until 0 results. Limit max is 100. ```APIDOC ## get_history_by_flight_number(flight_number, page=1, limit=100) ### Description Fetch the history of a flight by its number. This method can be used to get the history of a flight route by the number. It checks the user authentication and returns the data accordingly. You need to query page 1 first, and if there are more pages then increment page number until you get 0 results back. Limit has a max value of 100. ### Method SDK Method ### Parameters - **flight_number** (str) - Required - The flight number, e.g. AI101 - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass in higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned (max 100) ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_flight_number('AI101') f.get_history_by_flight_number('AI101',page=1,limit=10) ``` ``` -------------------------------- ### get_airport_weather(iata, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves the weather at an airport. Optional page and limit parameters allow pagination. ```APIDOC ## get_airport_weather(iata, page=1, limit=100) ### Description Retrieve the weather at an airport. Given the IATA code of an airport, this method returns the weather information. ### Method SDK Method ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_weather('HYD') f.get_airport_weather('HYD',page=1,limit=10) ``` ``` -------------------------------- ### Retrieve list of airports by country Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches a list of all airports within a specified country. ```python from pyflightdata import FlightData f=FlightData() f.get_airports('India') ``` -------------------------------- ### get_airport_reviews(iata, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves the passenger reviews of an airport. Optional page and limit parameters allow pagination. ```APIDOC ## get_airport_reviews(iata, page=1, limit=100) ### Description Retrieve the passenger reviews of an airport. Given the IATA code of an airport, this method returns the passenger reviews of an airport. ### Method SDK Method ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData()#optional login f.login(myemail,mypassword) f.get_airport_reviews('HYD') f.get_airport_reviews('HYD',page=1,limit=10) ``` ``` -------------------------------- ### get_airports(country) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Returns a list of all the airports for a given country. Each airport is represented as a dict with information like the IATA code. ```APIDOC ## get_airports(country) ### Description Returns a list of all the airports. For a given country this returns a list of dicts, one for each airport, with information like the iata code of the airport etc. ### Method SDK Method ### Parameters - **country** (str) - Required - The country for which the airports will be fetched ### Example ```python from pyflightdata import FlightData f=FlightData() .get_airports('India') ``` ``` -------------------------------- ### Retrieve aircraft on ground at an airport Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Returns a list of aircraft currently on the ground at the specified airport. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_onground('HYD') f.get_airport_onground('HYD',page=1,limit=10) ``` -------------------------------- ### get_flight_for_date(flight_number, date_str) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetch a flight by its number for a given date. The date should be in the YYYYMMDD format. Checks user authentication and returns data accordingly. ```APIDOC ## get_flight_for_date(flight_number, date_str) ### Description Fetch a flight by its number for a given date. The date should be in the YYYYMMDD format. This method checks the user authentication and returns the data accordingly. ### Method Function call ### Parameters - **flight_number** (str) - Required - The flight number, e.g. AI101 - **date_str** (str) - Required - The date, e.g. 20191116 - **page** (int) - Optional - Optional page number; for users who are on a plan with flightradar24 they can pass in higher page numbers to get more data - **limit** (int) - Optional - Optional limit on number of records returned ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_flight_number('AI101','20191116') ``` ``` -------------------------------- ### get_airport_onground(iata, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves the aircraft on the ground at a given airport IATA code. Optional page and limit parameters allow pagination. ```APIDOC ## get_airport_onground(iata, page=1, limit=100) ### Description Retrieve the aircraft on ground at an airport. Given the IATA code of an airport, this method returns the aircraft on the ground at the airport. ### Method SDK Method ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_onground('HYD') f.get_airport_onground('HYD',page=1,limit=10) ``` ``` -------------------------------- ### Fetch aircraft history by tail number Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_history_by_tail_number to retrieve history for a specific aircraft. Query page 1 first and increment if more data exists, with a maximum limit of 100. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_tail_number('VT-ANL') f.get_history_by_tail_number('VT-ANL',page=1,limit=10) ``` -------------------------------- ### Fetch flight history by flight number Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_history_by_flight_number to retrieve flight history. Query page 1 first and increment if more data exists, with a maximum limit of 100. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_history_by_flight_number('AI101') f.get_history_by_flight_number('AI101',page=1,limit=10) ``` -------------------------------- ### FlightData.get_airport_departures(iata, page=1, limit=100, earlier_data=False) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves departure information for an airport given its IATA code. ```APIDOC ## FlightData.get_airport_departures(iata, page=1, limit=100, earlier_data=False) ### Description Retrieves departure information for an airport given its IATA code. ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD. - **page** (int) - Optional - Page number; for users on a plan with flightradar24, higher page numbers give more data. - **limit** (int) - Optional - Limit on number of records returned. - **earlier_data** (boolean) - Optional - Default false; set to true to get data from earlier in time. ### Returns A list of dicts with the data; one dict for each row of data from flightradar24. ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_departures('HYD') f.get_airport_departures('HYD',page=1,limit=10) ``` ``` -------------------------------- ### Fetch flight history by flight number Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Use get_all_available_history_by_flight_number to retrieve history for a specific flight number. An optional delay parameter can be set to control the interval between data checks. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_all_available_history_by_flight_number('6E375',delay=2) ``` -------------------------------- ### FlightData.get_airlines() Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Returns a list of all airlines known to flightradar24, with details such as airline code, call sign, and codes. ```APIDOC ## FlightData.get_airlines() ### Description Returns a list of all airlines known to flightradar24, with details such as airline code, call sign, and codes. ### Returns A list of dicts, one for each airline, with details like airline code, call sign, codes, etc. ### Example ```python from pyflightdata import FlightData f=FlightData() f.get_airlines() ``` ``` -------------------------------- ### Retrieve airport METAR data Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches current METAR information for a specified airport IATA code. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_metars('HYD') ``` -------------------------------- ### FlightData.get_airport_details(iata, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves detailed information for an airport given its IATA code. ```APIDOC ## FlightData.get_airport_details(iata, page=1, limit=100) ### Description Retrieves detailed information for an airport given its IATA code, including lat lon, full name, URL, codes, etc. ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD. - **page** (int) - Optional - Page number; for users on a plan with flightradar24, higher page numbers give more data. - **limit** (int) - Optional - Limit on number of records returned. ### Returns A list of dicts with the data; one dict for each row of data from flightradar24. ### Example ```python from pyflightdata import FlightData f=FlightData() .login(myemail,mypassword) f.get_airport_details('HYD') f.get_airport_details('HYD',page=1,limit=10) ``` ``` -------------------------------- ### Retrieve airport performance statistics Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches performance statistics for a specified airport. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_stats('HYD') f.get_airport_stats('HYD',page=1,limit=10) ``` -------------------------------- ### logout() Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Logs out from the flightradar24 session. This resets the user token that was retrieved earlier, so subsequent API calls will return data visible to unauthenticated users. ```APIDOC ## logout() ### Description Logs out from the flightradar24 session. This resets the user token that was retrieved earlier, so subsequent API calls will return data visible to unauthenticated users. ### Method logout() ### Parameters None ### Response No return value is documented. ``` -------------------------------- ### Decode a METAR string Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Decodes a given METAR string into a readable format. The input is a METAR string, and the output is the decoded data. ```python from pyflightdata import FlightData f=FlightData() f.decode_metar('WSSS 181030Z 04009KT 010V080 9999 FEW018TCU BKN300 29/22 Q1007 NOSIG') ``` -------------------------------- ### get_airport_stats(iata, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves the performance statistics at an airport. Optional page and limit parameters allow pagination. ```APIDOC ## get_airport_stats(iata, page=1, limit=100) ### Description Retrieve the performance statistics at an airport. Given the IATA code of an airport, this method returns the performance statistics for the airport. ### Method SDK Method ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned ### Returns A list of dicts with the data; one dict for each row of data from flightradar24 ### Example ```python from pyflightdata import FlightData f=FlightData()#optional login f.login(myemail,mypassword) f.get_airport_stats('HYD') f.get_airport_stats('HYD',page=1,limit=10) ``` ``` -------------------------------- ### Retrieve historical airport METAR data Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Fetches unparsed METAR information for the past 72 hours for a specified airport. ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_metars_hist('HYD') ``` -------------------------------- ### FlightData.decode_metar(metar) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Decodes a given METAR string into a readable format. ```APIDOC ## FlightData.decode_metar(metar) ### Description Decodes a given METAR string into a readable format. ### Parameters - **metar** (str) - Required - The METAR data to decode. ### Returns The METAR data in readable format. ### Example ```python from pyflightdata import FlightData f=FlightData() f.decode_metar('WSSS 181030Z 04009KT 010V080 9999 FEW018TCU BKN300 29/22 Q1007 NOSIG') ``` ``` -------------------------------- ### is_authenticated() Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Simple method to check if the user is authenticated to flightradar24. ```APIDOC ## is_authenticated() ### Description Simple method to check if the user is authenticated to flightradar24. ### Method SDK Method ### Parameters None ### Returns Boolean indicating authentication status (not explicitly documented) ``` -------------------------------- ### Clear last request between flight history queries Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Clears the internal state between calls to get_history_by_flight_number to avoid interference when querying multiple flight numbers in a loop. ```python from pyflightdata import FlightData f=FlightData() f.get_history_by_flight_number('AI176') f.clear_last_request() f.get_history_by_flight_number('AI101') ``` -------------------------------- ### get_airport_metars(iata, page=1, limit=100) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves the current METAR data for a given airport IATA code. Optional page and limit parameters allow pagination for users on higher plans. ```APIDOC ## get_airport_metars(iata, page=1, limit=100) ### Description Retrieve the metar data at the current time. Given the IATA code of an airport, this method returns the metar information. ### Method SDK Method ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD - **page** (int) - Optional - Page number; for users on a plan with flightradar24 they can pass higher page numbers to get more data - **limit** (int) - Optional - Limit on number of records returned ### Returns The metar data for the airport ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_metars('HYD') ``` ``` -------------------------------- ### FlightData.clear_last_request() Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Clears the internal state that tracks the last request for history queries. Useful when querying multiple flight numbers in a loop. ```APIDOC ## FlightData.clear_last_request() ### Description Clears the internal state that tracks the last request for history queries. Useful when querying multiple flight numbers in a loop. ### Example ```python from pyflightdata import FlightData f=FlightData() f.get_history_by_flight_number('AI176') f.clear_last_request() f.get_history_by_flight_number('AI101') ``` ``` -------------------------------- ### get_airport_metars_hist(iata) Source: https://pyflightdata.readthedocs.io/en/latest/pyflightdata.html Retrieves METAR data for the past 72 hours for a given airport IATA code. The data is not parsed to a readable format. ```APIDOC ## get_airport_metars_hist(iata) ### Description Retrieve the metar data for past 72 hours. The data will not be parsed to readable format. Given the IATA code of an airport, this method returns the metar information for last 72 hours. ### Method SDK Method ### Parameters - **iata** (str) - Required - The IATA code for an airport, e.g. HYD ### Returns The metar data for the airport ### Example ```python from pyflightdata import FlightData f=FlightData() #optional login f.login(myemail,mypassword) f.get_airport_metars_hist('HYD') ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.