State of Python SOAP support at the end of 2011? [duplicate] - python
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
The community reviewed whether to reopen this question 12 months ago and left it closed:
Original close reason(s) were not resolved
I've never used SOAP before and I'm sort of new to Python. I'm doing this to get myself acquainted with both technologies. I've installed SOAPlib and I've tried to read their Client documentation, but I don't understand it too well. Is there anything else I can look into which is more suited for being a SOAP Client library for Python?
Edit: Just in case it helps, I'm using Python 2.6.
Update (2016):
If you only need SOAP client, there is well maintained library called zeep. It supports both Python 2 and 3 :)
Update:
Additionally to what is mentioned above, I will refer to Python WebServices page which is always up-to-date with all actively maintained and recommended modules to SOAP and all other webservice types.
Unfortunately, at the moment, I don't think there is a "best" Python SOAP library. Each of the mainstream ones available has its own pros and cons.
Older libraries:
SOAPy: Was the "best," but no longer maintained. Does not work on Python 2.5+
ZSI: Very painful to use, and development is slow. Has a module called "SOAPpy", which is different than SOAPy (above).
"Newer" libraries:
SUDS: Very Pythonic, and easy to create WSDL-consuming SOAP clients. Creating SOAP servers is a little bit more difficult. (This package does not work with Python3. For Python3 see SUDS-py3)
SUDS-py3: The Python3 version of SUDS
spyne: Creating servers is easy, creating clients a little bit more challenging. Documentation is somewhat lacking.
ladon: Creating servers is much like in soaplib (using a decorator). Ladon exposes more interfaces than SOAP at the same time without extra user code needed.
pysimplesoap: very lightweight but useful for both client and server - includes a web2py server integration that ships with web2py.
SOAPpy: Distinct from the abandoned SOAPpy that's hosted at the ZSI link above, this version was actually maintained until 2011, now it seems to be abandoned too.
soaplib: Easy to use python library for writing and calling soap web services. Webservices written with soaplib are simple, lightweight, work well with other SOAP implementations, and can be deployed as WSGI applications.
osa: A fast/slim easy to use SOAP python client library.
Of the above, I've only used SUDS personally, and I liked it a lot.
I followed the advice of other answers to this question and gave SUDS a try. After using it "in anger" I must agree: SUDS is very nice! Highly recommended!
I did run into trouble calling HTTPS-based web services from behind a proxy. At the time of this writing, this affects all Python web-service clients that use urllib2, so I'll document the solution here.
The urllib2 module shipping with python 2.6.2 and below will not issue a CONNECT to the proxy for HTTPS-over-HTTP-proxy sessions. This results in a long timeout, or if you are lucky, an error that looks like:
abort: error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
This was issue1424152 on the Python bug tracker. There are patches attached to the bug report that will fix this in Python 2.x and Python 3.x. The issue is already fixed.
I had good experience with SUDS
https://fedorahosted.org/suds
Used their TestSuite as documentation.
SUDS is the way to go, no question about it.
Just an FYI warning for people looking at SUDS, until this ticket is resolved, SUDS does not support the "choice" tag in WSDL:
https://fedorahosted.org/suds/ticket/342
see:
suds and choice tag
SUDS is easy to use, but is not guaranteed to be re-entrant. If you're keeping the WSDL Client() object around in a threaded app for better performance, there's some risk involved. The solution to this risk, the clone() method, throws the unrecoverable Python 5508 bug, which seems to print but not really throw an exception. Can be confusing, but it works. It is still by far the best Python SOAP client.
We released a new library: PySimpleSOAP, that provides support for simple and functional client/server. It goals are: ease of use and flexibility (no classes, autogenerated code or xml is required), WSDL introspection and generation, WS-I standard compliance, compatibility (including Java AXIS, .NET and Jboss WS). It is included into Web2Py to enable full-stack solutions (complementing other supported protocols such as XML_RPC, JSON, AMF-RPC, etc.).
If someone is learning SOAP or want to investigate it, I think it is a good choice to start.
I believe soaplib has deprecated its SOAP client ('sender') in favor of suds. At this point soaplib is focused on being a web framework agnostic SOAP server ('receiver'). Currently soaplib is under active development and is usually discussed in the Python SOAP mailing list:
http://mail.python.org/mailman/listinfo/soap
In my conclusion we have this:
Soap client side:
use only Suds-jurko (updated 2016)
suds is well maintained and updated.
UPDATE 06/2017: suds-jurko library is not updated and apparently abandoned,
I tested zeep library but got limitations around tokens, by now just support UsernameToken, i report a bug to create timestamp token and author update the code to fix it.
Zeep start good and has good documentation , so i recently migrated my code from suds to zeep and works fine.
Soap server side:
We have TGWS, soaplib (pysimplesoap not tested) IMHO use and help soaplib must be the choice.
Best regards,
As I suggested here I recommend you roll your own. It's actually not that difficult and I suspect that's the reason there aren't better Python SOAP libraries out there.
suds is pretty good. I tried SOAPpy but didn't get it to work in quite the way I needed whereas suds worked pretty much straight away.
Could this help: http://users.skynet.be/pascalbotte/rcx-ws-doc/python.htm#SOAPPY
I found it by searching for wsdl and python, with the rational being, that you would need a wsdl description of a SOAP server to do any useful client wrappers....
We'd used SOAPpy from Python Web Services, but it seems that ZSI (same source) is replacing it.
Im using SOAPpy with Python 2.5.3 in a production setting.
I had to manually edit a couple of files in SOAPpy (something about header code being in the wrong place) but other than that it worked and continues to do so very reliably.
Related
How to receive the Events from .NET using Python
I want to consume the events/Signals exposed by the Application via .NET SignalR. My requirement is to receive those signals using Python. Kindly help me out.
A similar question was asked here: Using SignalR server from Python code There are no Python SignalR libraries available, so your only option would be to port a lightweight version of SignalR to python yourself. See https://github.com/davidfowl/SignalR.Lite Obviously this is not a trivial undertaking!
I just wanted to offer another approach. Maybe the simpler solution would be to execute the SignalrR javascript library in python and just create a translational layer to get it back into python objects. I do not have code proving this, but I was hoping this would encourage someone in the future to try it.
What Python plugin should I use with XAMPP
Hi all this is just a general question if anyone can help it would be greatly appreciated. I am creating a website for a college project and i'm using XAMPP to develop the website. I require a Python plugin as I am trying to create an area where the user can type in a python script and the response will be mirrored in an adjacent iframe. I was going to use mod_python as the plugin but from research into this i have found that this is now dead and will eventually not be supported. Has anyone got any advice into what I should use because i can not find any relevant information online. Many thanks Andy Rose
I've already commented, but I'll add a little historical context. mod_python used to be the defacto standard, at least unofficially, but back in 2003, the Python web-sig's proposal for a formal standard for a Python web interface was published as PEP333, more commonly known as the Python Web Server Gateway Interface, or WSGI. Since then, mod_wsgi was created to support the new standard, although mod_python can also be used with the appropriate wrappers. As for which is 'better', that's a subjective question, but mod_wsgi seems to be preferred by the majority of the Python community. For example, Django dropped support for mod_python in 2011.
Different Python Google APIs
I am trying to figure out the difference between Google's GData API ( http://code.google.com/p/gdata-python-client/ ) and Google's APIs Client Library for Python ( http://code.google.com/p/google-api-python-client/ ). They both seem to be by Google. Which is the official one? How are they different? The second seems to use OAuth primarily. If anyone has knowledge or experience using either it would be great to get some information about this! PS: I though about putting this on superuser, but because it is programming related I thought it would be better here.
The difference is the same as the difference between the corresponding Java libraries (http://code.google.com/p/google-api-java-client/ and http://code.google.com/p/gdata-java-client/) That is, the gdata- version of the code has gone into maintenance mode, probably won't be updated to cover new APIs, but will have bugs fixed as they're found. The google-api- version is under very active development. There's a good discussion of the pros and cons of each version of the Java api here: http://code.google.com/p/gdata-java-client/wiki/MigratingToGoogleApiJavaClient The non-java-specific parts of that document also apply to the python api libraries.
These libraries are also intended to support different protocols. The APIs supported by google-api-python-client are discovery based, while those supported by gdata-python-client use the GData protocol.
For anyone with free time: Trying to learn how to replace PHP with Python, failing terribly [duplicate]
This question already has answers here: Closed 12 years ago. Possible Duplicate: Python noob here: On a Python enabled web server, how do I use Python? I want give web development using Python a shot, but I'm failing hard. I don't even know if I CAN run Python. The webpage for my web host says it supports all kinds of stuff, including Python. I've never touched anything CGI related and this does not appear to be a noob friendly area. Below is all the information I could think of that might be useful: Shared host: Yes Webhost: dibbsonhosting.com Server OS: linux Python installed: Yes (or so says the webhost) mod_python installed: Don't Know WSGI installed: Don't Know Access to http.conf: No Terminal access: No Cpanel: Yes FTP: Yes Django: downloaded latest stable release, not uploaded anywhere, not sure where to put it. DB: MySQL 5.x I really want to use Python for web development! Thanks!
Alright, I'm not going to hold your hand, but let me suggest: Start off by installing and running it on your own computer, if at all possible. This lets you see what you can do with Python before you have to worry about the complexities of setting it up with a webserver. If you've never used Python before, then before you start trying to use it for web development, take a few minutes getting the feel of it: what function definitions look like, the abilities of slicing, the neatest way to do loops, and so on. There are various good tutorials available: Dive into Python claims to be aimed at people with experience programming in other languages. Start learning with a microframework, rather than Django. When you want to do serious websites, you can take advantage of the power of Django, but for now, keep it straightforward. As was suggested in your other question, Flask and Bottle are good contenders.
MALON, Django has a builtin development server; try it on your local machine first. The Django tutorial seems to assume that you are running some Unix flavor (like Linux) on your local machine (a Mac would be fine too). If you are running some MS Windows, this page may help. Don't be scared of the command line, setup is only once. The Django admin app is worth the trouble! Indeed PHP is synonimous of cheap hosting and very well supported. Write some crap and run. Python support is not as pervasive; at some hosting providers, working with Python is almost as easy as with PHP, and most have instructions about Django in their FAQs. The mechanics is different: Python frameworks don't reload with each page load like PHP, there is an application always running that responds to HTTP requests. That is why you are advised to start on your local machine, just to acquaint the new paradigm.
What SOAP client libraries exist for Python, and where is the documentation for them? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago. The community reviewed whether to reopen this question 12 months ago and left it closed: Original close reason(s) were not resolved I've never used SOAP before and I'm sort of new to Python. I'm doing this to get myself acquainted with both technologies. I've installed SOAPlib and I've tried to read their Client documentation, but I don't understand it too well. Is there anything else I can look into which is more suited for being a SOAP Client library for Python? Edit: Just in case it helps, I'm using Python 2.6.
Update (2016): If you only need SOAP client, there is well maintained library called zeep. It supports both Python 2 and 3 :) Update: Additionally to what is mentioned above, I will refer to Python WebServices page which is always up-to-date with all actively maintained and recommended modules to SOAP and all other webservice types. Unfortunately, at the moment, I don't think there is a "best" Python SOAP library. Each of the mainstream ones available has its own pros and cons. Older libraries: SOAPy: Was the "best," but no longer maintained. Does not work on Python 2.5+ ZSI: Very painful to use, and development is slow. Has a module called "SOAPpy", which is different than SOAPy (above). "Newer" libraries: SUDS: Very Pythonic, and easy to create WSDL-consuming SOAP clients. Creating SOAP servers is a little bit more difficult. (This package does not work with Python3. For Python3 see SUDS-py3) SUDS-py3: The Python3 version of SUDS spyne: Creating servers is easy, creating clients a little bit more challenging. Documentation is somewhat lacking. ladon: Creating servers is much like in soaplib (using a decorator). Ladon exposes more interfaces than SOAP at the same time without extra user code needed. pysimplesoap: very lightweight but useful for both client and server - includes a web2py server integration that ships with web2py. SOAPpy: Distinct from the abandoned SOAPpy that's hosted at the ZSI link above, this version was actually maintained until 2011, now it seems to be abandoned too. soaplib: Easy to use python library for writing and calling soap web services. Webservices written with soaplib are simple, lightweight, work well with other SOAP implementations, and can be deployed as WSGI applications. osa: A fast/slim easy to use SOAP python client library. Of the above, I've only used SUDS personally, and I liked it a lot.
I followed the advice of other answers to this question and gave SUDS a try. After using it "in anger" I must agree: SUDS is very nice! Highly recommended! I did run into trouble calling HTTPS-based web services from behind a proxy. At the time of this writing, this affects all Python web-service clients that use urllib2, so I'll document the solution here. The urllib2 module shipping with python 2.6.2 and below will not issue a CONNECT to the proxy for HTTPS-over-HTTP-proxy sessions. This results in a long timeout, or if you are lucky, an error that looks like: abort: error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol This was issue1424152 on the Python bug tracker. There are patches attached to the bug report that will fix this in Python 2.x and Python 3.x. The issue is already fixed.
I had good experience with SUDS https://fedorahosted.org/suds Used their TestSuite as documentation.
SUDS is the way to go, no question about it.
Just an FYI warning for people looking at SUDS, until this ticket is resolved, SUDS does not support the "choice" tag in WSDL: https://fedorahosted.org/suds/ticket/342 see: suds and choice tag
SUDS is easy to use, but is not guaranteed to be re-entrant. If you're keeping the WSDL Client() object around in a threaded app for better performance, there's some risk involved. The solution to this risk, the clone() method, throws the unrecoverable Python 5508 bug, which seems to print but not really throw an exception. Can be confusing, but it works. It is still by far the best Python SOAP client.
We released a new library: PySimpleSOAP, that provides support for simple and functional client/server. It goals are: ease of use and flexibility (no classes, autogenerated code or xml is required), WSDL introspection and generation, WS-I standard compliance, compatibility (including Java AXIS, .NET and Jboss WS). It is included into Web2Py to enable full-stack solutions (complementing other supported protocols such as XML_RPC, JSON, AMF-RPC, etc.). If someone is learning SOAP or want to investigate it, I think it is a good choice to start.
I believe soaplib has deprecated its SOAP client ('sender') in favor of suds. At this point soaplib is focused on being a web framework agnostic SOAP server ('receiver'). Currently soaplib is under active development and is usually discussed in the Python SOAP mailing list: http://mail.python.org/mailman/listinfo/soap
In my conclusion we have this: Soap client side: use only Suds-jurko (updated 2016) suds is well maintained and updated. UPDATE 06/2017: suds-jurko library is not updated and apparently abandoned, I tested zeep library but got limitations around tokens, by now just support UsernameToken, i report a bug to create timestamp token and author update the code to fix it. Zeep start good and has good documentation , so i recently migrated my code from suds to zeep and works fine. Soap server side: We have TGWS, soaplib (pysimplesoap not tested) IMHO use and help soaplib must be the choice. Best regards,
As I suggested here I recommend you roll your own. It's actually not that difficult and I suspect that's the reason there aren't better Python SOAP libraries out there.
suds is pretty good. I tried SOAPpy but didn't get it to work in quite the way I needed whereas suds worked pretty much straight away.
Could this help: http://users.skynet.be/pascalbotte/rcx-ws-doc/python.htm#SOAPPY I found it by searching for wsdl and python, with the rational being, that you would need a wsdl description of a SOAP server to do any useful client wrappers....
We'd used SOAPpy from Python Web Services, but it seems that ZSI (same source) is replacing it.
Im using SOAPpy with Python 2.5.3 in a production setting. I had to manually edit a couple of files in SOAPpy (something about header code being in the wrong place) but other than that it worked and continues to do so very reliably.