2 :mod:`DocXMLRPCServer` --- Self-documenting XML-RPC server
3 ==========================================================
5 .. module:: DocXMLRPCServer
6 :synopsis: Self-documenting XML-RPC server implementation.
7 .. moduleauthor:: Brian Quinlan <brianq@activestate.com>
8 .. sectionauthor:: Brian Quinlan <brianq@activestate.com>
13 The :mod:`DocXMLRPCServer` module extends the classes found in
14 :mod:`SimpleXMLRPCServer` to serve HTML documentation in response to HTTP GET
15 requests. Servers can either be free standing, using :class:`DocXMLRPCServer`,
16 or embedded in a CGI environment, using :class:`DocCGIXMLRPCRequestHandler`.
19 .. class:: DocXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]])
21 Create a new server instance. All parameters have the same meaning as for
22 :class:`SimpleXMLRPCServer.SimpleXMLRPCServer`; *requestHandler* defaults to
23 :class:`DocXMLRPCRequestHandler`.
26 .. class:: DocCGIXMLRPCRequestHandler()
28 Create a new instance to handle XML-RPC requests in a CGI environment.
31 .. class:: DocXMLRPCRequestHandler()
33 Create a new request handler instance. This request handler supports XML-RPC
34 POST requests, documentation GET requests, and modifies logging so that the
35 *logRequests* parameter to the :class:`DocXMLRPCServer` constructor parameter is
39 .. _doc-xmlrpc-servers:
41 DocXMLRPCServer Objects
42 -----------------------
44 The :class:`DocXMLRPCServer` class is derived from
45 :class:`SimpleXMLRPCServer.SimpleXMLRPCServer` and provides a means of creating
46 self-documenting, stand alone XML-RPC servers. HTTP POST requests are handled as
47 XML-RPC method calls. HTTP GET requests are handled by generating pydoc-style
48 HTML documentation. This allows a server to provide its own web-based
52 .. method:: DocXMLRPCServer.set_server_title(server_title)
54 Set the title used in the generated HTML documentation. This title will be used
55 inside the HTML "title" element.
58 .. method:: DocXMLRPCServer.set_server_name(server_name)
60 Set the name used in the generated HTML documentation. This name will appear at
61 the top of the generated documentation inside a "h1" element.
64 .. method:: DocXMLRPCServer.set_server_documentation(server_documentation)
66 Set the description used in the generated HTML documentation. This description
67 will appear as a paragraph, below the server name, in the documentation.
70 DocCGIXMLRPCRequestHandler
71 --------------------------
73 The :class:`DocCGIXMLRPCRequestHandler` class is derived from
74 :class:`SimpleXMLRPCServer.CGIXMLRPCRequestHandler` and provides a means of
75 creating self-documenting, XML-RPC CGI scripts. HTTP POST requests are handled
76 as XML-RPC method calls. HTTP GET requests are handled by generating pydoc-style
77 HTML documentation. This allows a server to provide its own web-based
81 .. method:: DocCGIXMLRPCRequestHandler.set_server_title(server_title)
83 Set the title used in the generated HTML documentation. This title will be used
84 inside the HTML "title" element.
87 .. method:: DocCGIXMLRPCRequestHandler.set_server_name(server_name)
89 Set the name used in the generated HTML documentation. This name will appear at
90 the top of the generated documentation inside a "h1" element.
93 .. method:: DocCGIXMLRPCRequestHandler.set_server_documentation(server_documentation)
95 Set the description used in the generated HTML documentation. This description
96 will appear as a paragraph, below the server name, in the documentation.