We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The xmlrpclib Module

(New in 2.2) XML-RPC client library.

# File: xmlrpclib-example-1.py

import xmlrpclib

server = xmlrpclib.ServerProxy("http://effbot.org/rpc/echo.cgi")
result = server.echo("hello")


The library also contains tools to marshal and unmarshal XML-RPC requests.

# File: xmlrpclib-example-2.py

import xmlrpclib

args = 1, 2.0, "three"

params = xmlrpclib.dumps(args)

args, method = xmlrpclib.loads(params)

print params
print args
(1, 2.0, 'hello')