Dec 18
Python XML-RPC Server for CGI
xmlrpcserver is a small and lightweight XML-RPC server developed for the usage as a CGI script.
Normal webspace providers do not allow the implementation of socket servers or scripts running in an infinite loop. So the only possible solution to run a web service is to implement it as a CGI script which handles the requests when beeing called.
The module is written completely in Python and follows the XML-RPC specification.
The following code shows the usage:
#!/usr/bin/python
from flamelab_xmlrpcserver import *
class Coder(object):
def getScripts(self):
'''get availiable scripts of coder'''
return ["Python", "PHP", "ActionScript"]
server = SimpleXMLRPCCGIServer()
server.registerInstance('coder', Coder())
server.handleRequest()
from flamelab_xmlrpcserver import *
class Coder(object):
def getScripts(self):
'''get availiable scripts of coder'''
return ["Python", "PHP", "ActionScript"]
server = SimpleXMLRPCCGIServer()
server.registerInstance('coder', Coder())
server.handleRequest()
Check out the XML-RPC Server project page or download the XML-RPC Server
Comments are closed.