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

Latest commit

 

History

History
23 lines (20 loc) · 872 Bytes

README.md

File metadata and controls

23 lines (20 loc) · 872 Bytes

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'