| 18 | | <itemizedlist> |
|---|
| 19 | | <listitem> |
|---|
| 20 | | <section> |
|---|
| 21 | | <title>cherrypy.request.remoteAddr</title> |
|---|
| 22 | | <para>This attribute is a string containing the IP address of the client. It will |
|---|
| 23 | | be an empty string if it is not available.</para> |
|---|
| 24 | | </section> |
|---|
| 25 | | </listitem> |
|---|
| 26 | | <listitem> |
|---|
| 27 | | <section> |
|---|
| 28 | | <title>cherrypy.request.remotePort</title> |
|---|
| 29 | | <para>This attribute is an int containing the TCP port number of the client. It |
|---|
| 30 | | will be -1 if it is not available.</para> |
|---|
| 31 | | </section> |
|---|
| 32 | | </listitem> |
|---|
| 33 | | <listitem> |
|---|
| 34 | | <section> |
|---|
| 35 | | <title>cherrypy.request.remoteHost</title> |
|---|
| 36 | | <para>This attribute is a string containing the remote hostname of the |
|---|
| 37 | | client.</para> |
|---|
| 38 | | </section> |
|---|
| 39 | | </listitem> |
|---|
| 40 | | <listitem> |
|---|
| 41 | | <section> |
|---|
| 42 | | <title>cherrypy.request.headerMap</title> |
|---|
| 43 | | <para>This attribute is dictionary containing the received HTTP headers.</para> |
|---|
| 44 | | </section> |
|---|
| 45 | | </listitem> |
|---|
| 46 | | <listitem> |
|---|
| 47 | | <section> |
|---|
| 48 | | <title>cherrypy.request.requestLine</title> |
|---|
| 49 | | <para>This attribute is a string containing the first line of the raw HTTP |
|---|
| 50 | | request.</para> |
|---|
| 51 | | </section> |
|---|
| 52 | | </listitem> |
|---|
| 53 | | <listitem> |
|---|
| 54 | | <section> |
|---|
| 55 | | <title>cherrypy.request.simpleCookie</title> |
|---|
| 56 | | <para>This attribute is a SimpleCookie instance from the standard library's |
|---|
| 57 | | Cookie module which contains the incoming cookie values from the client.</para> |
|---|
| 58 | | </section> |
|---|
| 59 | | </listitem> |
|---|
| 60 | | <listitem> |
|---|
| 61 | | <section> |
|---|
| 62 | | <title>cherrypy.request.rfile</title> |
|---|
| 63 | | <para>This attribute is the input stream to the client. See |
|---|
| 64 | | cherrypy.request.processRequestBody for more information.</para> |
|---|
| 65 | | </section> |
|---|
| 66 | | </listitem> |
|---|
| 67 | | <listitem> |
|---|
| 68 | | <section> |
|---|
| 69 | | <title>cherrypy.request.processRequestBody</title> |
|---|
| 70 | | <para>This attribute should be accessed during the beforeRequestBody stage of the |
|---|
| 71 | | request (if you don't know what this means, read the section on filters). This |
|---|
| 72 | | specifies whether or not the request's POST data will be parsed into the |
|---|
| 73 | | cherrypy.request.paramMap. It defaults to true for POST requests, but when false, |
|---|
| 74 | | cherrypy.request.rfile will be readable by the exposed method. Otherwise, rfile |
|---|
| 75 | | is completely read before control is handled to the exposed method.</para> |
|---|
| 76 | | </section> |
|---|
| 77 | | </listitem> |
|---|
| 78 | | <listitem> |
|---|
| 79 | | <section> |
|---|
| 80 | | <title>cherrypy.request.method</title> |
|---|
| 81 | | <para>This attribute is a string containing the HTTP request method, such as GET |
|---|
| 82 | | or POST.</para> |
|---|
| 83 | | </section> |
|---|
| 84 | | </listitem> |
|---|
| 85 | | <listitem> |
|---|
| 86 | | <section> |
|---|
| 87 | | <title>cherrypy.request.protocol</title> |
|---|
| 88 | | <para>This attribute is a string containing the HTTP protocol of the request in |
|---|
| 89 | | the form of HTTP/x.x</para> |
|---|
| 90 | | </section> |
|---|
| 91 | | </listitem> |
|---|
| 92 | | <listitem> |
|---|
| 93 | | <section> |
|---|
| 94 | | <title>cherrypy.request.queryString</title> |
|---|
| 95 | | <para>This attribute is a string containing the query string of the request (the |
|---|
| 96 | | part of the URL following '?').</para> |
|---|
| 97 | | </section> |
|---|
| 98 | | </listitem> |
|---|
| 99 | | <listitem> |
|---|
| 100 | | <section> |
|---|
| 101 | | <title>cherrypy.request.path</title> |
|---|
| 102 | | <para>This attribute is a string containing the path of the resource the client |
|---|
| 103 | | requested.</para> |
|---|
| 104 | | </section> |
|---|
| 105 | | </listitem> |
|---|
| 106 | | <listitem> |
|---|
| 107 | | <section> |
|---|
| 108 | | <title>cherrypy.request.paramMap</title> |
|---|
| 109 | | <para>This attribute is a dictionary containing the query string and POST |
|---|
| 110 | | arguments of this request.</para> |
|---|
| 111 | | </section> |
|---|
| 112 | | </listitem> |
|---|
| 113 | | <listitem> |
|---|
| 114 | | <section> |
|---|
| 115 | | <title>cherrypy.request.base</title> |
|---|
| 116 | | <para>This attribute is a string containing the root URL of the server.</para> |
|---|
| 117 | | </section> |
|---|
| 118 | | </listitem> |
|---|
| 119 | | <listitem> |
|---|
| 120 | | <section> |
|---|
| 121 | | <title>cherrypy.request.browserUrl</title> |
|---|
| 122 | | <para>This attribute is a string containing the URL the client requested.</para> |
|---|
| 123 | | </section> |
|---|
| 124 | | </listitem> |
|---|
| 125 | | <listitem> |
|---|
| 126 | | <section> |
|---|
| 127 | | <title>cherrypy.request.objectPath</title> |
|---|
| 128 | | <para>This attribute is a string containing the path of the exposed method that |
|---|
| 129 | | will be called to handle this request. This is usually the same as |
|---|
| 130 | | cherrypy.request.path, but can be changed in a filter to change which method is |
|---|
| 131 | | actually called.</para> |
|---|
| 132 | | </section> |
|---|
| 133 | | </listitem> |
|---|
| 134 | | <listitem> |
|---|
| 135 | | <section> |
|---|
| 136 | | <title>cherrypy.request.originalPath</title> |
|---|
| 137 | | <para>This attribute is a string containing the original value of |
|---|
| 138 | | cherrypy.request.path, in case it is modified by a filter during the |
|---|
| 139 | | request.</para> |
|---|
| 140 | | </section> |
|---|
| 141 | | </listitem> |
|---|
| 142 | | <listitem> |
|---|
| 143 | | <section> |
|---|
| 144 | | <title>cherrypy.request.originalParamMap</title> |
|---|
| 145 | | <para>This attribute is a string containing the original value of |
|---|
| 146 | | cherrypy.request.paramMap, in case it is modified by a filter during the |
|---|
| 147 | | request.</para> |
|---|
| 148 | | </section> |
|---|
| 149 | | </listitem> |
|---|
| 150 | | <listitem> |
|---|
| 151 | | <section> |
|---|
| 152 | | <title>cherrypy.request.scheme</title> |
|---|
| 153 | | <para>This attribute is a string containing the URL scheme used in this request. |
|---|
| 154 | | It is either "http" or "https".</para> |
|---|
| 155 | | </section> |
|---|
| 156 | | </listitem> |
|---|
| 157 | | </itemizedlist> |
|---|
| | 16 | <section> |
|---|
| | 17 | <title>cherrypy.request.remoteAddr</title> |
|---|
| | 18 | <para>This attribute is a string containing the IP address of the client. It will |
|---|
| | 19 | be an empty string if it is not available.</para> |
|---|
| | 20 | </section> |
|---|
| | 21 | <section> |
|---|
| | 22 | <title>cherrypy.request.remotePort</title> |
|---|
| | 23 | <para>This attribute is an int containing the TCP port number of the client. It |
|---|
| | 24 | will be -1 if it is not available.</para> |
|---|
| | 25 | </section> |
|---|
| | 26 | <section> |
|---|
| | 27 | <title>cherrypy.request.remoteHost</title> |
|---|
| | 28 | <para>This attribute is a string containing the remote hostname of the |
|---|
| | 29 | client.</para> |
|---|
| | 30 | </section> |
|---|
| | 31 | <section> |
|---|
| | 32 | <title>cherrypy.request.headerMap</title> |
|---|
| | 33 | <para>This attribute is dictionary containing the received HTTP headers.</para> |
|---|
| | 34 | </section> |
|---|
| | 35 | <section> |
|---|
| | 36 | <title>cherrypy.request.requestLine</title> |
|---|
| | 37 | <para>This attribute is a string containing the first line of the raw HTTP |
|---|
| | 38 | request.</para> |
|---|
| | 39 | </section> |
|---|
| | 40 | <section> |
|---|
| | 41 | <title>cherrypy.request.simpleCookie</title> |
|---|
| | 42 | <para>This attribute is a SimpleCookie instance from the standard library's |
|---|
| | 43 | Cookie module which contains the incoming cookie values from the client.</para> |
|---|
| | 44 | </section> |
|---|
| | 45 | <section> |
|---|
| | 46 | <title>cherrypy.request.rfile</title> |
|---|
| | 47 | <para>This attribute is the input stream to the client. See |
|---|
| | 48 | cherrypy.request.processRequestBody for more information.</para> |
|---|
| | 49 | </section> |
|---|
| | 50 | <section> |
|---|
| | 51 | <title>cherrypy.request.processRequestBody</title> |
|---|
| | 52 | <para>This attribute should be accessed during the beforeRequestBody stage of the |
|---|
| | 53 | request (if you don't know what this means, read the section on filters). This |
|---|
| | 54 | specifies whether or not the request's POST data will be parsed into the |
|---|
| | 55 | cherrypy.request.paramMap. It defaults to true for POST requests, but when false, |
|---|
| | 56 | cherrypy.request.rfile will be readable by the exposed method. Otherwise, rfile |
|---|
| | 57 | is completely read before control is handled to the exposed method.</para> |
|---|
| | 58 | </section> |
|---|
| | 59 | <section> |
|---|
| | 60 | <title>cherrypy.request.method</title> |
|---|
| | 61 | <para>This attribute is a string containing the HTTP request method, such as GET |
|---|
| | 62 | or POST.</para> |
|---|
| | 63 | </section> |
|---|
| | 64 | <section> |
|---|
| | 65 | <title>cherrypy.request.protocol</title> |
|---|
| | 66 | <para>This attribute is a string containing the HTTP protocol of the request in |
|---|
| | 67 | the form of HTTP/x.x</para> |
|---|
| | 68 | </section> |
|---|
| | 69 | <section> |
|---|
| | 70 | <title>cherrypy.request.queryString</title> |
|---|
| | 71 | <para>This attribute is a string containing the query string of the request (the |
|---|
| | 72 | part of the URL following '?').</para> |
|---|
| | 73 | </section> |
|---|
| | 74 | <section> |
|---|
| | 75 | <title>cherrypy.request.path</title> |
|---|
| | 76 | <para>This attribute is a string containing the path of the resource the client |
|---|
| | 77 | requested.</para> |
|---|
| | 78 | </section> |
|---|
| | 79 | <section> |
|---|
| | 80 | <title>cherrypy.request.paramMap</title> |
|---|
| | 81 | <para>This attribute is a dictionary containing the query string and POST |
|---|
| | 82 | arguments of this request.</para> |
|---|
| | 83 | </section> |
|---|
| | 84 | <section> |
|---|
| | 85 | <title>cherrypy.request.base</title> |
|---|
| | 86 | <para>This attribute is a string containing the root URL of the server.</para> |
|---|
| | 87 | </section> |
|---|
| | 88 | <section> |
|---|
| | 89 | <title>cherrypy.request.browserUrl</title> |
|---|
| | 90 | <para>This attribute is a string containing the URL the client requested.</para> |
|---|
| | 91 | </section> |
|---|
| | 92 | <section> |
|---|
| | 93 | <title>cherrypy.request.objectPath</title> |
|---|
| | 94 | <para>This attribute is a string containing the path of the exposed method that |
|---|
| | 95 | will be called to handle this request. This is usually the same as |
|---|
| | 96 | cherrypy.request.path, but can be changed in a filter to change which method is |
|---|
| | 97 | actually called.</para> |
|---|
| | 98 | </section> |
|---|
| | 99 | <section> |
|---|
| | 100 | <title>cherrypy.request.originalPath</title> |
|---|
| | 101 | <para>This attribute is a string containing the original value of |
|---|
| | 102 | cherrypy.request.path, in case it is modified by a filter during the |
|---|
| | 103 | request.</para> |
|---|
| | 104 | </section> |
|---|
| | 105 | <section> |
|---|
| | 106 | <title>cherrypy.request.originalParamMap</title> |
|---|
| | 107 | <para>This attribute is a string containing the original value of |
|---|
| | 108 | cherrypy.request.paramMap, in case it is modified by a filter during the |
|---|
| | 109 | request.</para> |
|---|
| | 110 | </section> |
|---|
| | 111 | <section> |
|---|
| | 112 | <title>cherrypy.request.scheme</title> |
|---|
| | 113 | <para>This attribute is a string containing the URL scheme used in this request. |
|---|
| | 114 | It is either "http" or "https".</para> |
|---|
| | 115 | </section> |
|---|
| 162 | | <itemizedlist> |
|---|
| 163 | | <listitem> |
|---|
| 164 | | <section> |
|---|
| 165 | | <title>cherrypy.response.headerMap</title> |
|---|
| 166 | | <para>This attribute is a dictionary with automatically titled keys. It holds all |
|---|
| 167 | | outgoing HTTP headers to the client.</para> |
|---|
| 168 | | </section> |
|---|
| 169 | | </listitem> |
|---|
| 170 | | <listitem> |
|---|
| 171 | | <section> |
|---|
| 172 | | <title>cherrypy.response.simpleCookie</title> |
|---|
| 173 | | <para>This attribute is a SimpleCookie instance from the standard library's |
|---|
| 174 | | Cookie module. It contains the outgoing cookie values.</para> |
|---|
| 175 | | </section> |
|---|
| 176 | | </listitem> |
|---|
| 177 | | <listitem> |
|---|
| 178 | | <section> |
|---|
| 179 | | <title>cherrypy.response.body</title> |
|---|
| 180 | | <para>This attribute is originally just the return value of the exposed method, |
|---|
| 181 | | but by the end of the request it must be an iterable (usually a list or generator |
|---|
| 182 | | of strings) which will be the content of the HTTP response.</para> |
|---|
| 183 | | </section> |
|---|
| 184 | | </listitem> |
|---|
| 185 | | <listitem> |
|---|
| 186 | | <section> |
|---|
| 187 | | <title>cherrypy.response.status</title> |
|---|
| 188 | | <para>This attribute is a string containing the HTTP response code in the form |
|---|
| 189 | | "### Reason Phrase", i.e. "200 OK"</para> |
|---|
| 190 | | </section> |
|---|
| 191 | | </listitem> |
|---|
| 192 | | </itemizedlist> |
|---|
| | 120 | <section> |
|---|
| | 121 | <title>cherrypy.response.headerMap</title> |
|---|
| | 122 | <para>This attribute is a dictionary with automatically titled keys. It holds all |
|---|
| | 123 | outgoing HTTP headers to the client.</para> |
|---|
| | 124 | </section> |
|---|
| | 125 | <section> |
|---|
| | 126 | <title>cherrypy.response.simpleCookie</title> |
|---|
| | 127 | <para>This attribute is a SimpleCookie instance from the standard library's |
|---|
| | 128 | Cookie module. It contains the outgoing cookie values.</para> |
|---|
| | 129 | </section> |
|---|
| | 130 | <section> |
|---|
| | 131 | <title>cherrypy.response.body</title> |
|---|
| | 132 | <para>This attribute is originally just the return value of the exposed method, |
|---|
| | 133 | but by the end of the request it must be an iterable (usually a list or generator |
|---|
| | 134 | of strings) which will be the content of the HTTP response.</para> |
|---|
| | 135 | </section> |
|---|
| | 136 | <section> |
|---|
| | 137 | <title>cherrypy.response.status</title> |
|---|
| | 138 | <para>This attribute is a string containing the HTTP response code in the form |
|---|
| | 139 | "### Reason Phrase", i.e. "200 OK"</para> |
|---|
| | 140 | </section> |
|---|
| 196 | | <itemizedlist> |
|---|
| 197 | | <listitem> |
|---|
| 198 | | <section> |
|---|
| 199 | | <title>cherrypy.server.start()</title> |
|---|
| 200 | | <para>Start the CherryPy Server.</para> |
|---|
| 201 | | </section> |
|---|
| 202 | | </listitem> |
|---|
| 203 | | <listitem> |
|---|
| 204 | | <section> |
|---|
| 205 | | <title>cherrypy.server.stop()</title> |
|---|
| 206 | | <para>Stop the CherryPy Server.</para> |
|---|
| 207 | | </section> |
|---|
| 208 | | </listitem> |
|---|
| 209 | | <listitem> |
|---|
| 210 | | <section> |
|---|
| 211 | | <title>cherrypy.server.restart()</title> |
|---|
| 212 | | <para>Restart the CherryPy Server.</para> |
|---|
| 213 | | </section> |
|---|
| 214 | | </listitem> |
|---|
| 215 | | <listitem> |
|---|
| 216 | | <section> |
|---|
| 217 | | <title>cherrypy.server.onStartServerList</title> |
|---|
| 218 | | <para>A list of functions that will be called when the server starts.</para> |
|---|
| 219 | | </section> |
|---|
| 220 | | </listitem> |
|---|
| 221 | | <listitem> |
|---|
| 222 | | <section> |
|---|
| 223 | | <title>cherrypy.server.onStopServerList</title> |
|---|
| 224 | | <para>A list of functions that will be called when the server stops.</para> |
|---|
| 225 | | </section> |
|---|
| 226 | | </listitem> |
|---|
| 227 | | <listitem> |
|---|
| 228 | | <section> |
|---|
| 229 | | <title>cherrypy.server.onStartThreadList</title> |
|---|
| 230 | | <para>A list of functions that will be called when each thread is started.</para> |
|---|
| 231 | | </section> |
|---|
| 232 | | </listitem> |
|---|
| 233 | | <listitem> |
|---|
| 234 | | <section> |
|---|
| 235 | | <title>cherrypy.server.onStopThreadList</title> |
|---|
| 236 | | <para>A list of functions that will be called when each thread is stopped.</para> |
|---|
| 237 | | </section> |
|---|
| 238 | | </listitem> |
|---|
| 239 | | </itemizedlist> |
|---|
| | 144 | <section> |
|---|
| | 145 | <title>cherrypy.server.start()</title> |
|---|
| | 146 | <para>Start the CherryPy Server.</para> |
|---|
| | 147 | </section> |
|---|
| | 148 | <section> |
|---|
| | 149 | <title>cherrypy.server.stop()</title> |
|---|
| | 150 | <para>Stop the CherryPy Server.</para> |
|---|
| | 151 | </section> |
|---|
| | 152 | <section> |
|---|
| | 153 | <title>cherrypy.server.restart()</title> |
|---|
| | 154 | <para>Restart the CherryPy Server.</para> |
|---|
| | 155 | </section> |
|---|
| | 156 | <section> |
|---|
| | 157 | <title>cherrypy.server.onStartServerList</title> |
|---|
| | 158 | <para>A list of functions that will be called when the server starts.</para> |
|---|
| | 159 | </section> |
|---|
| | 160 | <section> |
|---|
| | 161 | <title>cherrypy.server.onStopServerList</title> |
|---|
| | 162 | <para>A list of functions that will be called when the server stops.</para> |
|---|
| | 163 | </section> |
|---|
| | 164 | <section> |
|---|
| | 165 | <title>cherrypy.server.onStartThreadList</title> |
|---|
| | 166 | <para>A list of functions that will be called when each thread is started.</para> |
|---|
| | 167 | </section> |
|---|
| | 168 | <section> |
|---|
| | 169 | <title>cherrypy.server.onStopThreadList</title> |
|---|
| | 170 | <para>A list of functions that will be called when each thread is stopped.</para> |
|---|
| | 171 | </section> |
|---|
| 244 | | <itemizedlist> |
|---|
| 245 | | <listitem> |
|---|
| 246 | | <section> |
|---|
| 247 | | <title>cherrypy.config.get(key, defaultValue = None, returnSection = |
|---|
| 248 | | False)</title> |
|---|
| 249 | | <para>This function returns the configuration value for the given key. The |
|---|
| 250 | | function checks if the setting is defined for the current request path, it walks |
|---|
| 251 | | up the request path until the key is found, or it returns the default value. If |
|---|
| 252 | | returnSection is True, the function returns the configuration path where the key |
|---|
| 253 | | is defined.</para> |
|---|
| 254 | | </section> |
|---|
| 255 | | </listitem> |
|---|
| 256 | | <listitem> |
|---|
| 257 | | <section> |
|---|
| 258 | | <title>cherrypy.config.getAll(key)</title> |
|---|
| 259 | | <para>The getAll function returns a list containing a (path, value) tuple for all |
|---|
| 260 | | occurences of the key within the request path. This function allows applications |
|---|
| 261 | | to inherit configuration data defined for parent paths.</para> |
|---|
| 262 | | </section> |
|---|
| 263 | | </listitem> |
|---|
| 264 | | <listitem> |
|---|
| 265 | | <section> |
|---|
| 266 | | <title>cherrypy.config.update(updateMap=None, file=None)</title> |
|---|
| 267 | | <para>Function to update the configuration map. upDateMap is a dictionary of the |
|---|
| 268 | | form {'sectionPath' : { } }, file is the path to the configuration file.</para> |
|---|
| 269 | | </section> |
|---|
| 270 | | </listitem> |
|---|
| 271 | | </itemizedlist> |
|---|
| | 176 | <section> |
|---|
| | 177 | <title>cherrypy.config.get(key, defaultValue = None, returnSection = |
|---|
| | 178 | False)</title> |
|---|
| | 179 | <para>This function returns the configuration value for the given key. The |
|---|
| | 180 | function checks if the setting is defined for the current request path, it walks |
|---|
| | 181 | up the request path until the key is found, or it returns the default value. If |
|---|
| | 182 | returnSection is True, the function returns the configuration path where the key |
|---|
| | 183 | is defined.</para> |
|---|
| | 184 | </section> |
|---|
| | 185 | <section> |
|---|
| | 186 | <title>cherrypy.config.getAll(key)</title> |
|---|
| | 187 | <para>The getAll function returns a list containing a (path, value) tuple for all |
|---|
| | 188 | occurences of the key within the request path. This function allows applications |
|---|
| | 189 | to inherit configuration data defined for parent paths.</para> |
|---|
| | 190 | </section> |
|---|
| | 191 | <section> |
|---|
| | 192 | <title>cherrypy.config.update(updateMap=None, file=None)</title> |
|---|
| | 193 | <para>Function to update the configuration map. upDateMap is a dictionary of the |
|---|
| | 194 | form {'sectionPath' : { } }, file is the path to the configuration file.</para> |
|---|
| | 195 | </section> |
|---|