Skip to content

sylvaus/python_flights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Flights

Introduction

This python package provides a small wrapper around the RapidAPI interface to SkyScanner API

Basic Usage

To use the functions provided by Python Flights you will need to get an API key from RapidAPI: link

from datetime import datetime

from python_flights.client import FlightBrowser

API_KEY = "YOUR_API_KEY"

browser = FlightBrowser(API_KEY)
# Print all currencies available
print(browser.currencies) 
# Print all airports having the Montreal keyword
print(browser.get_airports("Montreal"))
# Get itineraries matching the given dates from Porto airport and Bangkok airport
itineraries = browser.get_flights(datetime(year=2020, month=1, day=12), "OPO", datetime(year=2020, month=1, day=24) , "BKK")

TODO

  • Add compatibility with python 3.5 / 3.6
  • Add docstring to all functions
  • Add helper methods to the different containers

About

Get flights prices from RapidAPI interface to SkyScanner API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages