Skip to main content

Library for communicating with GSX Web Services API.

Project description

Introduction

gsxws is a Python library designed to work with Apple's GSX Web Services API. The goal is for it to support all the features of the API. Currently it supports most of them.

Please consult the GSX API documentation (Testing, Production) for more details.

Requirements

  • Python 2.7 or later
  • contents of requirements.pip
  • GSX client certs and valid Apple ID with access to GSX Web Services

Installation:

pip install gsxws

... or grab the latest dev version:

pip install -U -e git+git://github.com/filipp/py-gsxws.git#egg=gsxws

Usage

It goes a little something like this:

# check warranty status
import os
import gsxws
os.environ['GSX_CERT'] = '/path/to/gsx/client/cert.pem'
os.environ['GSX_KEY'] = '/path/to/gsx/client/cert_private_key.pem'
gsxws.connect(apple_id, sold_to)
mac = gsxws.Product('70033CDFA4S')
mac.warranty()
# get available parts for this machine
mac.parts()

Check the tests folder for more examples.

FAQ

  • Q: My script keeps prompting me for the private key passphrase - how could I automate this?

  • A: One way would be to remove the passphrase from the key:

    openssl rsa -in privatekey.pem -out privatekey.nopass.pem

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

gsxws-0.94.tar.gz (29.1 kB view details)

Uploaded Source

File details

Details for the file gsxws-0.94.tar.gz.

File metadata

  • Download URL: gsxws-0.94.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gsxws-0.94.tar.gz
Algorithm Hash digest
SHA256 c1bf29d3467ecfc15ce30dc39330de16452037b9edb20c9473a044672d8215b4
MD5 b9098913558d3efa37f6c20330bf8dbf
BLAKE2b-256 33998d34e41fe8a9f2680c7ec176decacfacb9b89bf96eb44f73bafe0f906af8

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