xmlrpc.client.ServerProxy()
xmlrpc.client.ServerProxy() is a Python function in the XML-RPC Module category. Creates a proxy for calling XML-RPC methods on a remote server. The syntax is xmlrpc.client.ServerProxy(uri, transport=None, encoding=None, verbose=False, allow_none=False, useContext=False). Returns: ServerProxy object. A typical example: import xmlrpc.client
server = xmlrpc.client.ServerProxy("http://localhost:8000")
result = server.add(2, 3) # Calls remote add() method
print(result) # 5. A close sibling is xmlrpc.server.SimpleXMLRPCServer(), which creates a simple XML-RPC 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.server.SimpleXMLRPCServer(), 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.client.ServerProxy() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.