Skip to main content

kiwi 2021 entry task about flight route

Project description

Environment

  • python 3.9+

Doc

python [path to]kiwi/main.py [args]

usage: main.py [-h] [--bags BAGS] [--return] csvPath origin destination

kiwi flight search

positional arguments:
csvPath
origin
destination

optional arguments:
-h, --help   show this help message and exit
--bags BAGS
--return

Implementation

  • code is self documented

theory

  1. process inputs and csv
  2. sort flight base on departure time
  3. create "chain" (its list of chained flights from origin to destination of last flight in chain)
  4. iterate in sorted flights and enrich chains which are in same airports as flight origin if conditions to flight are met
  5. if destination is final target add chain to "final flight plans"
  6. iterate final flight plants to resolve data needed to json export
  7. create json models
  8. sort base on final price
  9. json dumps

Autor Bc. Filip Agh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flight-routes-0.0.3.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page