Personal tools

Andrew Mleczko, blog, pubblica-amministrazione

Aug 19, 2009

suds: SOAP client that works (also in Plone)

Filed Under:

If you need a lightweight SOAP client for consuming web services - you need to try suds.

I'm developing SOAP integration in Plone. I have never used efficiently SOAP python client before so first I wanted to test all of them. According to Plone there are two well-known python SOAP implementations: ZSI and SOAPpy. They are both focused on server not client implementation. It took me some time to configured them properly and found that the last release for ZSI was 2006 (for SOAPpy it was 2005). Finally I found suds. It's fast, light and powerful. And it has a community which is helpful - especially for beginners. 

Installing and using is veery simple. You can use easy_install:

>>> easy_install suds


and use it:

from suds.client import Client
url = 'http://localhost/testingservice.wsdl'
client = Client(url)


than accessing methods is as simple as:

document = client.service.getDocument(id=1)
print document
title = 'Document title'
description = 'Document short description'


even if your webservice has strange method names:

document = getattr(client.service,'get-document')(id=1)

Aug 16, 2009

munin.zope is born

Filed Under:

Last week we moved redturtle.munin to it's new namespace - munin.zope.

Recently, with a lot of witsch help (honestly - it was almost all his work :-), we have refactored redturtle.munin and moved it to munin.zope namespace. The idea is to use it also for other projects - like munin.varnish or munin.django etc. If you don't know munin.zope yet it provides munin plugins for monitoring various aspects of a Zope instance. It's easy to deploy and almost ready out-of-the-buildout.

As for 1.1a1 we have for plugins available:

  • "zopethreads" - reports free Zope threads
  • "zopecache" - reports database cache parameters
  • "zodbactivity" - reports ZODB activity
  • "zopememory" - reports Zope memory usage (only works on Linux)

We are working right now on another one - ZODB conflict errors. It's supposed to count number of conflict errors in last 5 minutes.