Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Skyscanner Python SDK

Project description

Documentation Status https://coveralls.io/repos/Skyscanner/skyscanner-python-sdk/badge.svg?branch=master&service=github

Skyscanner Python SDK for Skyscanner’s API

Features

  • Tested on Python 2.6, 2.7, 3.3, 3.4
  • Supports Flights, Hotels, and Carhire

Installation

At the command line:

$ easy_install skyscanner

Or, if you have virtualenvwrapper installed:

$ mkvirtualenv skyscanner
$ pip install skyscanner

Quick start

  1. Request for an API Key from Skyscanner for Business Contact Page.

  2. Set your API Key:

    from skyscanner.skyscanner import Flights
    flights_service = Flights('<Your API Key>')
    
  3. Get the flights live pricing result by writing a few lines of code:

    from skyscanner.skyscanner import Flights
    
    flights_service = Flights('<Your API Key>')
    result = flights_service.get_result(
        country='UK',
        currency='GBP',
        locale='en-GB',
        originplace='SIN-sky',
        destinationplace='KUL-sky',
        outbounddate='2016-07-28',
        inbounddate='2016-07-31',
        adults=1).parsed
    
    print(result)
    

Note that both the inbounddate and outbounddate might need to be updated.

More examples

For more example usage, refer to our documentation.

Known Issues

  • Tests might appear to be broken sometimes, this is due to the throttling in the API. In such cases, you will see the following error in the build log:

    requests.exceptions.HTTPError: 429 Client Error: Too many requests in the last minute.
    

History

1.0.0 (2015-03-24)

  • First release on PyPI.

1.1.0 (2015-07-18)

  • Stable release on PyPI.

1.1.1 (2015-08-01)

  • Fixes for Python 2.6, 3.3, and 3.4.

1.1.2 (2015-08-01)

  • Support additional params for Flights Pricing Service. Fix for issue #15.

1.1.3 (2015-08-01)

  • Set default error handling to graceful. Fix for issue #19.

Project details


Release history Release notifications

This version
History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
skyscanner-1.1.4-py2.py3-none-any.whl (11.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 12, 2016
skyscanner-1.1.4.tar.gz (22.5 kB) Copy SHA256 hash SHA256 Source None Sep 12, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page