xmlrpc.server.SimpleXMLRPCServer()
xmlrpc.server.SimpleXMLRPCServer() is a Python function in the XML-RPC Module category. Creates a simple XML-RPC server. The syntax is xmlrpc.server.SimpleXMLRPCServer(addr, requestHandler=None, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True). Returns: SimpleXMLRPCServer object. A typical example: from xmlrpc.server import SimpleXMLRPCServer
def add(x, y): return x + y
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_function(add, "add")
server.serve_forever(). A close sibling is xmlrpc.client.ServerProxy(), which creates a proxy for calling XML-RPC methods on a remote server. A close sibling is xmlrpc.client.Binary(), which wraps binary data for XML-RPC transfer (Base64 encoded). A close sibling is xmlrpc.client.DateTime(), which wraps date/time values for XML-RPC transfer. More about this category: XML-RPC client and server — ServerProxy, SimpleXMLRPCServer. Related XML-RPC Module entries: xmlrpc.client.ServerProxy(), xmlrpc.client.Binary(), xmlrpc.client.DateTime(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try xmlrpc.server.SimpleXMLRPCServer() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.