Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 1 | |
| 2 | :mod:`DocXMLRPCServer` --- Self-documenting XML-RPC server |
| 3 | ========================================================== |
| 4 | |
| 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> |
| 9 | |
| 10 | |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 11 | The :mod:`DocXMLRPCServer` module extends the classes found in |
| 12 | :mod:`SimpleXMLRPCServer` to serve HTML documentation in response to HTTP GET |
| 13 | requests. Servers can either be free standing, using :class:`DocXMLRPCServer`, |
| 14 | or embedded in a CGI environment, using :class:`DocCGIXMLRPCRequestHandler`. |
| 15 | |
| 16 | |
| 17 | .. class:: DocXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]]) |
| 18 | |
| 19 | Create a new server instance. All parameters have the same meaning as for |
| 20 | :class:`SimpleXMLRPCServer.SimpleXMLRPCServer`; *requestHandler* defaults to |
| 21 | :class:`DocXMLRPCRequestHandler`. |
| 22 | |
| 23 | |
| 24 | .. class:: DocCGIXMLRPCRequestHandler() |
| 25 | |
| 26 | Create a new instance to handle XML-RPC requests in a CGI environment. |
| 27 | |
| 28 | |
| 29 | .. class:: DocXMLRPCRequestHandler() |
| 30 | |
| 31 | Create a new request handler instance. This request handler supports XML-RPC |
| 32 | POST requests, documentation GET requests, and modifies logging so that the |
| 33 | *logRequests* parameter to the :class:`DocXMLRPCServer` constructor parameter is |
| 34 | honored. |
| 35 | |
| 36 | |
| 37 | .. _doc-xmlrpc-servers: |
| 38 | |
| 39 | DocXMLRPCServer Objects |
| 40 | ----------------------- |
| 41 | |
| 42 | The :class:`DocXMLRPCServer` class is derived from |
| 43 | :class:`SimpleXMLRPCServer.SimpleXMLRPCServer` and provides a means of creating |
| 44 | self-documenting, stand alone XML-RPC servers. HTTP POST requests are handled as |
| 45 | XML-RPC method calls. HTTP GET requests are handled by generating pydoc-style |
| 46 | HTML documentation. This allows a server to provide its own web-based |
| 47 | documentation. |
| 48 | |
| 49 | |
| 50 | .. method:: DocXMLRPCServer.set_server_title(server_title) |
| 51 | |
| 52 | Set the title used in the generated HTML documentation. This title will be used |
| 53 | inside the HTML "title" element. |
| 54 | |
| 55 | |
| 56 | .. method:: DocXMLRPCServer.set_server_name(server_name) |
| 57 | |
| 58 | Set the name used in the generated HTML documentation. This name will appear at |
| 59 | the top of the generated documentation inside a "h1" element. |
| 60 | |
| 61 | |
| 62 | .. method:: DocXMLRPCServer.set_server_documentation(server_documentation) |
| 63 | |
| 64 | Set the description used in the generated HTML documentation. This description |
| 65 | will appear as a paragraph, below the server name, in the documentation. |
| 66 | |
| 67 | |
| 68 | DocCGIXMLRPCRequestHandler |
| 69 | -------------------------- |
| 70 | |
| 71 | The :class:`DocCGIXMLRPCRequestHandler` class is derived from |
| 72 | :class:`SimpleXMLRPCServer.CGIXMLRPCRequestHandler` and provides a means of |
| 73 | creating self-documenting, XML-RPC CGI scripts. HTTP POST requests are handled |
| 74 | as XML-RPC method calls. HTTP GET requests are handled by generating pydoc-style |
| 75 | HTML documentation. This allows a server to provide its own web-based |
| 76 | documentation. |
| 77 | |
| 78 | |
| 79 | .. method:: DocCGIXMLRPCRequestHandler.set_server_title(server_title) |
| 80 | |
| 81 | Set the title used in the generated HTML documentation. This title will be used |
| 82 | inside the HTML "title" element. |
| 83 | |
| 84 | |
| 85 | .. method:: DocCGIXMLRPCRequestHandler.set_server_name(server_name) |
| 86 | |
| 87 | Set the name used in the generated HTML documentation. This name will appear at |
| 88 | the top of the generated documentation inside a "h1" element. |
| 89 | |
| 90 | |
| 91 | .. method:: DocCGIXMLRPCRequestHandler.set_server_documentation(server_documentation) |
| 92 | |
| 93 | Set the description used in the generated HTML documentation. This description |
| 94 | will appear as a paragraph, below the server name, in the documentation. |
| 95 | |