Skip to main content

Skyscanner Python SDK

Project description

https://api.travis-ci.org/Skyscanner/skyscanner-python-sdk.svg https://img.shields.io/pypi/v/skyscanner.svg 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 import Flights
    flights_service = Flights('<Your API Key>')
  3. Get the flights live pricing result by writing a few lines of code:

    from 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.

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

skyscanner-1.1.2.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skyscanner-1.1.2-py2.py3-none-any.whl (10.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file skyscanner-1.1.2.tar.gz.

File metadata

  • Download URL: skyscanner-1.1.2.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for skyscanner-1.1.2.tar.gz
Algorithm Hash digest
SHA256 8a82b83d2ae47664c7db816aef25bfe68f014541d2be74e1a48000f0a73b6cd7
MD5 6c737d74a009a94a92832205945fcb2e
BLAKE2b-256 add1acb93fe16b413393e4d6b9accdf968857b92e23637bba449f45e8088b1ac

See more details on using hashes here.

File details

Details for the file skyscanner-1.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for skyscanner-1.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e768499cfb785326fc464550c13813e4280ada8f7d0bf68fa54df0438d8b7ebb
MD5 6ab4a79b2f7c62d51be3f9ea7f446642
BLAKE2b-256 47dcd1b932c8651f6aba6efa21954d37932cf3f1f5a4022ee19b4d82d207b039

See more details on using hashes here.

Supported by

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