Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

adamgilman/britishairways-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

britishairways-python Build Status

Python API to British Airways Flight Search

adamgilman$ export CLIENTKEY=[KeyFrom - developer.ba.com]
>>> from britishair import BA
>>> from datetime import datetime
>>> ba = BA()
>>> outboundDateTime = datetime(month=4, day=3, year=2015)
>>> inboundDateTime = datetime(month=4, day=10, year=2015)
>>> locationOutbound = "LHR"
>>> locationInbound = "LAX"
>>> fareClass = "Economy"
>>> fares = ba.search(outboundDateTime, locationOutbound, inboundDateTime, locationInbound, fareClass)
>>> fares[0][u'AirItineraryPricingInfo']['ItinTotalFare']['TotalFare']['@Amount']
u'965.66'
>>> fares[0][u'AirItineraryPricingInfo']['ItinTotalFare']['TotalFare']['@CurrencyCode']
u'GBP'

About

Python API to British Airways Flight Search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages