• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created over 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Skyscanner Python SDK

Skyscanner Python SDK

Important

As of May 1st, 2020, the project is deprecated and no longer maintained. The latest update in v1.1.5 includes changing the library to use a secure connection when calling Skyscanner's APIs as this is required for all users and http is no longer supported. The development of this SDK from that point on is fully abandoned.

As we cannot guarantee for how long it will continue working, you should not to use the SDK when starting new projects. If it is already in use in your projects, please upgrade to its latest version and keep in mind that due to planned changes in our Skyscanner APIs it may not work as expected after July 2020.

You will need to contact us to request an API key to use our APIs via the following form: https://partners.skyscanner.net/contact.

We receive a large number of requests and although we do our best to reply to all we cannot guarantee that your application will be successful.

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. Contact us to request an API key: https://partners.skyscanner.net/contact

  2. If you don't already have one, create a Skyscanner account.

  3. Sign into your account and click 'Import Existing App' and use your API key to create an App

  4. Set your API Key in your code:

    from skyscanner.skyscanner import Flights
    flights_service = Flights('<Your API Key>')
    
  5. 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='2017-05-28',
        inbounddate='2017-05-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 the SDK documentation or the API 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.
    
  • Please allow up to 15 minutes for your API key to be activated. Until it is activated you will get a 403 exception:

    requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://partners.api.skyscanner.net/apiservices/pricing/v1.0?apiKey=<Your API key>
    

More Repositories

1

SkyFloatingLabelTextField

A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.
Swift
4,094
star
2

backpack

Backpack Design System
TypeScript
492
star
3

whispers

Identify hardcoded secrets in static structured text
Python
480
star
4

turbolift

A simple tool to help apply changes across many GitHub repositories simultaneously
Go
434
star
5

LambdaGuard

AWS Serverless Security
Python
399
star
6

cfripper

Library and CLI tool for analysing CloudFormation templates and check them for security compliance.
Python
396
star
7

Dixie

Dixie, turning chaos to your advantage.
Objective-C
192
star
8

aiotask-context

Contextual information for asyncio tasks
Python
161
star
9

engineering-principles

Skyscanner's Engineering Principles
133
star
10

backpack-android

Backpack Design System
Kotlin
127
star
11

applicationset-progressive-sync

Progressive sync controller for Argo ApplicationSet
Go
124
star
12

full-stack-recruitment-test

JavaScript
110
star
13

backpack-ios

Backpack Design System
Swift
108
star
14

sonar-secrets

SonarQube plugin for identifying hardcoded secrets, such as passwords, API keys, AWS credentials, etc..
Java
99
star
15

pyfailsafe

Simple failure handling. Failsafe implementation in Python
Python
89
star
16

kms-issuer

KMS issuer is a cert-manager Certificate Request controller that uses AWS KMS to sign the certificate request.
Go
61
star
17

backpack-react-native

Backpack Design System
JavaScript
49
star
18

pycfmodel

A python model for Cloud Formation scripts
Python
27
star
19

ensure-node-env

A script that helps ensure you have the correct node & npm versions installed in your environment.
JavaScript
19
star
20

historical-bank-ruby

A Ruby Bank that serves historical exchange rates
Ruby
15
star
21

gradle-time-logger-plugin

Gradle plugin to log your build time
Kotlin
12
star
22

stylelint-config-skyscanner

Skyscanner's very own stylelint config.
JavaScript
10
star
23

gha-aws-oidc-sample

Enforcing per-repo privileges on AWS with GitHub Actions OIDC, without session tags
9
star
24

backpack-foundations

The foundational repo for Backpack platforms
JavaScript
9
star
25

eslint-config-skyscanner

Skyscanner's ESLint configuration
JavaScript
7
star
26

skyscanner-contentful-management

CLI tool for performing bulk actions with content managed using Contentful
Python
7
star
27

backpack-docs

Backpack design system's docs
JavaScript
7
star
28

skyscanner.github.io

Homepage of Skyscanner Open Source Software https://skyscanner.github.io
JavaScript
5
star
29

cra-template-backpack

The Backpack template used for Backpack React Scripts app creation.
HTML
4
star
30

backpack-node-sass

Parallelised node-sass with Backpack support.
JavaScript
3
star
31

OpenTSDB-rollup

Spark job generating rollup data points from a snapshot of an OpenTSDB raw data table
Java
3
star
32

backpack-usage-analyser

A tool to analyse the usage of Backpack resources in codebases.
JavaScript
2
star
33

grpc-asyncio

Python
2
star
34

eslint-plugin-backpack

JavaScript
1
star
35

eslint-config-skyscanner-with-prettier

Skyscanner's eslint config with additional support for Prettier
JavaScript
1
star
36

helm-argocd-appofapps

A helm chart that provides a relatively simple app of apps pattern
Smarty
1
star