Last active
August 29, 2015 14:11
-
-
Save offbeatadam/ab78f3a897c78bb2a64e to your computer and use it in GitHub Desktop.
Simple Python script to test that suds works and can list all pb methods in public SOAP api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# This script will print out all information contained in the WSDL endpoint for the 1.3 version Profitbricks API | |
# No authentication is required (this is public information). | |
# This is to assist with testing and diagnosis of problems getting started with profitbricks-client | |
# profitbricks-client requires suds to operate. To install: pip install suds | |
from suds import Client | |
# Location of the wsdl definition | |
url = 'https://api.profitbricks.com/1.3/wsdl' | |
# Client is the constructor for the SOAP client in suds | |
client = Client(url) | |
# Once connected, the client object points to all methods, types, and information for the wsdl. | |
wsdl = str(client) | |
# Print the information to the console | |
print wsdl | |
# https://jortel.fedorapeople.org/suds/doc/suds-module.html | |
# Fedora documentation on suds module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment