Getting SOAP-y with Python suds
Yeah I went there...
So, we have a process that allows us to programatically look stuff up. Only its not very repeatable, and therefore not much use yet. With this post I will take you through the creation of a python script that mimics what we did previously - finding things, and showing them to you.
For brevity, I am not going to take you through setting up Python and installing suds. With respect, if you can't figure that out yourself, you probably shouldn't be playing with this stuff anyways. Its also a post in and of itself, and plenty of others have covered it well. I am also using Ubuntu for this work. You can use OSX pretty much interchangeably since its all *NIX based. Windows will work, but I warn you now, its quirky. Obviously I don't provide any sort of warranty with anything I do here, and whilst I will try to help people who feedback about problems via windows, my initial response will probably be, "can you not use linux instead?"
So. Much like when we talked about the 4 sections of the SoapUI request, we will look at 4 sections of our Python script
- required variables
- API "proxy object" creation
- obtaining data via the proxy object