I want to access web service in Python or/and Perl scripts. What are the most popular and reliable libraries today?
I read this question, and I know about SOAPpy and ZSI. Can anybody say something about this libraries? Are they reliable enough for use in production?
If you're talking about SOAP then for Python I would definitely recommend suds :
https://fedorahosted.org/suds/
Checking couple of libraries for SOAP (including suds) only ZSI worked reliably for me. It is not complicated to use and it just works(tm). I recommend that.
Perl has fantastic CPAN libraries available for doing SOAP. Probably the easiest would be SOAP::Lite:
SOAP::Lite is a collection of Perl modules which provides a simple and lightweight interface to the Simple Object Access Protocol (SOAP) both on client and server side.
See more on the CPAN page.
Related
First of all: Yes, I know that there are plenty of SOAP/WSDL/Python Questions. And no, none of the answers I found was really helpful (anymore).
Secondly: Yes, I wouldn't use SOAP/WSDL anymore if I wouldn't need to. Unfortunately there are still huge software companies only offering web service through this interface. And I have to communicate with such a system. The specific company suggests the usage of PHP but I'm not really a PHP fan when it comes to serious things. I know that there seem to be good SOAP solutions for Java but Java is no option in this context.
The problem: There exists a multitude of SOAP packages for Python and quite some of them support WSDL. Foremost SOAPpy and ZSI. Unfortunately they usually depend on PyXML, which isn't compatible to recent Python versions anymore. I'm fine with Python 3 or Python 2.7, but nothing previous to that.
Since I don't want to ride a dead horse: Are there still any solutions to use SOAP / WSDL within current Python versions?
Check out: What SOAP libraries exist for Python 3.x?
I've used suds before and it feels good. It does seem pysimplesoap is more maintained though - I've only used pysimplesoap server side, not for consuming (e. client).
I search for OpenID-library, which works with python3. I need to be an OpenID-provider and OpenID-consumer. tornado.auth provides only consumer functionality. What I can use to implement provider functionality, or how it can be implemented with tornado?
Does anybody uses python3-openid (fork of python-openid)? How it works?
python3-openid is the Python 3 version of python-openid, which has been more or less the reference library for OpenID in Python for several years. So it should implement everything you need. (Disclaimer: I ported python3-openid over and am the maintainer of the PyPI package).
However, for Tornado you will need a non-blocking implementation, ideally using Tornado's HTTPClient classes, and currently python3-openid does not provide that -- if you'd like to implement it, though, I'll gladly work on your pull request!
I went with pyoidc because it is listed as a "Certified Relying Party Library" on the official list of "Certified OpenID Connect Implementations" directly on the website for the OpenID standard. It runs on Python 3.5+ and also doubles as a full OAuth2.0 implementation.
I know this is an old post but it is still relevant. One should not screw around when it comes to things like security and authentication, it could very well save your job to stick with officially recommended or certified libraries - if anything goes wrong, at least your choice of authentication library can't be called into question!
have you tried this, i found it on pypi:
http://pypi.python.org/pypi/python3-openid/3.0.1
I'm doing server/client application similar to Ubuntu Landscape (http://www.canonical.com/enterprise-services/ubuntu-advantage/landscape) for my school project.
The client part of application will send different informations (disk usage, packages etc.) to server. I know how to get informations and hot I'll handle them on the server side.
But I don't know how what is the best way to exchange informations. Would SOAP be ok or is there any better way for doing this? Messages can be large (for example a list of installed packages) or very small. I was looking at Twisted but don't know where to start. I have experience with SOAP in PHP, Java and C#.
And recommnedation is welcome, thanks
Look into XMLRPC or JSON-RPC which is likely supported in some why by all language through modules or packages.
SOAP is a complete bloat and widely considered as a failed hype.
I recommend using flask or smisk. Both frameworks are REST based, powerful, lightweight and pythonic. Flask is probably more mature and maintained. If you go down the SOAP road, you'll regret it sooner or later.
I've built my application in python (using greenthreads from eventlent) and I was supposed to use Orbited as comet server to pass requests from user-end javascript code to my application.
Sadly, I found that Orbited is dead, site is down for a few weeks and it lack python 2.7 support.
Could you recommend some good replacements?
You could build a comet server using gevent, meinheld, mongrel2, tornado, twisted, or uwsgi, all of which have long-polling examples. This list isn't exhaustive. You could also consider using WebSockets instead, several have WebSocket examples as well.
I haven't used it personally, but it seems that CometD has a Twisted-based implementation of its protocol.
It seems that for now the best option is to use Socket.io, which offer simple and feature-rich programming interface both on server and client side. The python options are:
gevent-socketio
SocketTornad.IO
socketIO-client
http://meteorserver.org/
Probably that won't register as an answer as you are looking for a server written in Python. Still, I would recommend this efficient server written in Perl. After all, IMHO, as an out-of-the-box/off-the-shelf solution it's as good as any other Python-based server can get.
Can you tell me: could I use twisted for p2p-applications creating? And what protocols should I choose for this?
The best solution is to use the source code for BitTorrent. It was built with Twisted until they switched over to a C++ implementation called Utorrent.
Last known Twisted version of BitTorrent
http://download.bittorrent.com/dl/archive/BitTorrent-5.2.2.tar.gz
Older versions
http://download.bittorrent.com/dl/archive/
As an alternative, you also might want to take a look at Vertex.
It is a p2p library built on top of Twisted and comes with goodies like bypassing firewalls.
Its probably more complete than the other people's sample.
Link to Vertex
https://github.com/twisted/vertex
bittorrent twisted python client/server
Yes, twisted was used to create the initial version of Bittorrent. There are some opensource libraries to start from.
Yes, you can absolutely use twisted to create a p2p application. The one that comes first to my mind is Dtella (http://dtella.org/). It's uses the Direct Connect protocol.
They provide the source code, so that could get you started. I know that quite a few different university networks have DC hubs running. That seems to be the ideal use of this protocol.