Skip to content

Aircraft Search application that supports the lookup of aircraft details via the aircraft's registration.

License

Notifications You must be signed in to change notification settings

04ac/Aircraft-Search

Repository files navigation

Aircraft Search

Aircraft details provider that queries multiple sources to find and display information about a given aircraft using any one of the following inputs:

  • Flight number (present on the boarding pass)
  • Aircraft registration number
  • Aircraft image (will be OCRd and then queried)

Can Identify multiple aircraft in a single uploaded image

Features

The script returns the following information:

  • Details about the aircraft such as Manufacturer, Engines, First flight etc.
  • Image of the aircraft obtained from the planespotters.net API
  • Recent past flights of the aircraft

There are four available versions:

Requirements

Python 3.7+

Installation

git clone https://github.com/04ac/Aircraft-Search.git
cd Aircraft-Search
pip install -r requirements.txt

Usage

- Base scraper module

example_module.py:

import json
import aircraft_search

aircraft_reg_no = "N145DQ"  # aircraft registration number

# Logging is disabled by default and hence the only output
# is the data about the aircraft being returned as an JSON object
# aircraft_data = aircraft_search.aircraft_details_query(
#     aircraft_registration_number)

aircraft_data = aircraft_search.aircraft_details_query(
    aircraft_reg_no, logging=True)
print("\nJSON data:\n", json.dumps(aircraft_data, indent=4))

- API + HTML Web interface

uvicorn api:app

Visit http://127.0.0.1:8000 in a browser to view the web interface

Available endpoint(s):

  • /query?regno=<input aircraft reg number here> Request type: GET/POST

- Streamlit Web Interface

streamlit run streamlit_web_interface.py

Todo

  • Enable searching for an aircraft using Flight Number
  • API: Enable sending image object as a POST request to /queryByImage so that users can search using aircraft / flight ticket's image
  • Web interface: Make a web app using the API as backend with features:
    • Query multiple reg numbers / flight numbers in parallel
    • Show aviation related fun facts while the backend API fetches the results
  • OCR: Switch to a faster OCR engine
  • OCR: Flight ticket Flight Number -> Query
  • Package aircraft_search as pip package
  • Add logo image with badges to README.md

License

This project is licensed under the terms of the MIT License.

Parent repository: 04ac/Aircraft-Search

About

Aircraft Search application that supports the lookup of aircraft details via the aircraft's registration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published