Skip to main content

Pythonic client for Sabre Dev Studio REST APIs

Project description

PyPi version Supported Python versions

Scabbard

About

Scabbard is a Pythonic client for the Sabre Dev Studio REST APIs. With Scabbard, it is not necessary to create extensive low-level boilerplate code before you can use each API call. You can begin to make real REST calls to the Sabre Dev Studio APIs with only 3 lines of code (including the import).

A scabbard is a sheath for holding a sword, such as a sabre :)

https://en.wikipedia.org/wiki/Scabbard

Sabre Dev Studio REST API documentation:

https://developer.sabre.com/docs/read/rest_apis/

https://developer.sabre.com/io-docs

Scabbard docs: https://bundgus.github.io/scabbard/

GitHub Home: https://github.com/bundgus/scabbard

Example Usage

A file called api_connect_parameters.json must exist in the directory in which python is run, with your Sabre Dev Studio clientID and clientSecret credentials.

You can register for a free Sabre Dev Studio account at the following URL: https://developer.sabre.com/apps/mykeys

{
  "clientId": "zzzzzzzzzzzzzzzz",
  "clientSecret": "xxxxxxxx",
  "environment": "https://api.test.sabre.com",
  "group": "DEVCENTER",
  "domain": "EXT",
  "formatVersion": "V1"
}
from scabbard import get_client

client = get_client()
countries = client.Air_Utility.V1ListsSupportedCountriesGet(pointofsalecountry='NZ').result()

print('PointOfSale')
print(countries.PointOfSale)

print('OriginCountries')
for c in countries.OriginCountries:
    print(c.CountryCode, c.CountryName)

print('DestinationCountries')
for c in countries.DestinationCountries:
    print(c.CountryCode, c.CountryName)

print('Links')
for l in countries.Links:
    print(l.rel)
    print(l.href)

Installation

$ pip install scabbard

License

Copyright (c) 2018, Mark Bundgus. All rights reserved.

Scabbard is licensed with a BSD 3-Clause License.

Project details


Release history Release notifications

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
scabbard-0.1.0-py3-none-any.whl (8.4 kB) Copy SHA256 hash SHA256 Wheel py3 Dec 28, 2017
scabbard-0.1.0.tar.gz (6.6 kB) Copy SHA256 hash SHA256 Source None Dec 28, 2017

Supported by

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