The web framework class, handles requests and returns responses. The primary method from a serving viewpoint is :meth:`~quart.app.Quart.handle_request`, from an application viewpoint all the other methods are vital. This can be extended in many ways, with most methods designed with
| 166 | |
| 167 | |
| 168 | class Quart(App): |
| 169 | """The web framework class, handles requests and returns responses. |
| 170 | |
| 171 | The primary method from a serving viewpoint is |
| 172 | :meth:`~quart.app.Quart.handle_request`, from an application |
| 173 | viewpoint all the other methods are vital. |
| 174 | |
| 175 | This can be extended in many ways, with most methods designed with |
| 176 | this in mind. Additionally any of the classes listed as attributes |
| 177 | can be replaced. |
| 178 | |
| 179 | Attributes: |
| 180 | aborter_class: The class to use to raise HTTP error via the abort |
| 181 | helper function. |
| 182 | app_ctx_globals_class: The class to use for the ``g`` object |
| 183 | asgi_http_class: The class to use to handle the ASGI HTTP |
| 184 | protocol. |
| 185 | asgi_lifespan_class: The class to use to handle the ASGI |
| 186 | lifespan protocol. |
| 187 | asgi_websocket_class: The class to use to handle the ASGI |
| 188 | websocket protocol. |
| 189 | config_class: The class to use for the configuration. |
| 190 | env: The name of the environment the app is running on. |
| 191 | event_class: The class to use to signal an event in an async |
| 192 | manner. |
| 193 | debug: Wrapper around configuration DEBUG value, in many places |
| 194 | this will result in more output if True. If unset, debug |
| 195 | mode will be activated if environ is set to 'development'. |
| 196 | jinja_environment: The class to use for the jinja environment. |
| 197 | jinja_options: The default options to set when creating the jinja |
| 198 | environment. |
| 199 | permanent_session_lifetime: Wrapper around configuration |
| 200 | PERMANENT_SESSION_LIFETIME value. Specifies how long the session |
| 201 | data should survive. |
| 202 | request_class: The class to use for requests. |
| 203 | response_class: The class to user for responses. |
| 204 | secret_key: Warpper around configuration SECRET_KEY value. The app |
| 205 | secret for signing sessions. |
| 206 | session_interface: The class to use as the session interface. |
| 207 | shutdown_event: This event is set when the app starts to |
| 208 | shutdown allowing waiting tasks to know when to stop. |
| 209 | url_map_class: The class to map rules to endpoints. |
| 210 | url_rule_class: The class to use for URL rules. |
| 211 | websocket_class: The class to use for websockets. |
| 212 | |
| 213 | """ |
| 214 | |
| 215 | asgi_http_class: type[ASGIHTTPProtocol] |
| 216 | asgi_lifespan_class: type[ASGILifespanProtocol] |
| 217 | asgi_websocket_class: type[ASGIWebsocketProtocol] |
| 218 | shutdown_event: Event |
| 219 | test_app_class: type[TestAppProtocol] |
| 220 | test_client_class: type[TestClientProtocol] # type: ignore[assignment] |
| 221 | |
| 222 | aborter_class = Aborter |
| 223 | app_ctx_globals_class = _AppCtxGlobals |
| 224 | asgi_http_class = ASGIHTTPConnection |
| 225 | asgi_lifespan_class = ASGILifespan |
searching dependent graphs…