/nt_tool

An award searching project aims to using public data by airlines more efficiently.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

User Guide

  1. install requirements
pip install -r requirements.txt
  1. In main.py set the conditions you want.
    max_stops = 2
    origins = ['PVG','TYO', 'HKG']
    destinations = ['LAX','SFO','ORD']
    start_dt = datetime.strptime('2023-09-29', '%Y-%m-%d')
    end_dt = datetime.strptime('2023-09-29', '%Y-%m-%d')
    dates = date_range(start_dt, end_dt)
    #  means eco, pre, biz and first
    cabin_class = [
                   "RWDECO",
                   "RWDPRECC",
                   "RWDBUS",
                   "RWDFIRST",
    ]
    price_filter = {
        'quota': {
            'operator': '>=',
            'value': 1
        },
        # 'cabin_class': {
        #     'operator': 'in',
        #     'value': ['J', 'F']
        # },
        # 'is_mix': {
        #     'operator': '==',
        #     'value': False
        # }
    }
    seg_sorter = {
        'key': 'departure_time',  # only takes 'duration_in_all', 'stops', 'departure_time' and 'arrival_time'.
        'ascending': True
    }

3.Run main.py and you will see the output file.

If you like this project, welcome to buy me a coffee.

Buy Me A Coffee