This looks like python (correct me if i'm wrong). May I ask if you have taken a look at the following link regarding the Python libraries that are on offer?
There should be an example in there that you can use to test. With your script, have you tried to execute it and if so, what is the response you are receiving?
Senior Technical Support Engineer Airship
The Embassy Tea House, 195-205 Union Street, London, SE1 0LN
Portland | San Francisco | London | Paris | New York | New Delhi