quart.wrappers.base module

class quart.wrappers.base.BaseRequestWebsocket(method: str, scheme: str, path: str, query_string: bytes, headers: Headers, root_path: str, http_version: str, scope: HTTPScope | WebsocketScope)

Bases: Request

This class is the basis for Requests and websockets..

json_module

A custom json decoding/encoding module, it should have dump, dumps, load, and loads methods

Type:

json.provider.JSONProvider

routing_exception

If an exception is raised during the route matching it will be stored here.

Type:

Exception | None

url_rule

The rule that this request has been matched too.

Type:

QuartRule | None

view_args

The keyword arguments for the view from the route matching.

Type:

dict[str, Any] | None

property blueprint: str | None

Returns the blueprint the matched endpoint belongs to.

This can be None if the request has not been matched or the endpoint is not in a blueprint.

property blueprints: list[str]

Return the names of the current blueprints. The returned list is ordered from the current blueprint, upwards through parent blueprints.

property endpoint: str | None

Returns the corresponding endpoint matched for this request.

This can be None if the request has not been matched with a rule.

json_module: json.provider.JSONProvider = <module 'quart.json' from '/usr/src/packages/BUILD/.pybuild/cpython3_3.12_quart/build/quart/json/__init__.py'>
property max_content_length: int | None

Read-only view of the MAX_CONTENT_LENGTH config key.

routing_exception: Exception | None = None
property script_root: str
property url_root: str
url_rule: QuartRule | None = None
view_args: dict[str, Any] | None = None