XML Processing Modules

xmlrpc.server

Reference server and dispatcher interfaces for XML-RPC. Explicitly registered functions can be called through a dispatcher without a socket. Do not expose arbitrary object attributes or trust XML requests; authentication, transport protection and resource controls are separate deployment concerns.

Formal Syntax & Structure

python syntaxpython
import xmlrpc.server

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
from xmlrpc.server import SimpleXMLRPCDispatcherdispatcher = SimpleXMLRPCDispatcher(allow_none=False, encoding=None)dispatcher.register_function(lambda a,b: a+b, "add")print(dispatcher.funcs["add"](2, 3))
Python Reference