1 from typing import Any, Dict, NoReturn
\r
3 class HTTPException(Exception):
\r
4 code = ... # type: Any
\r
5 description = ... # type: Any
\r
6 response = ... # type: Any
\r
7 def __init__(self, description=None, response=None): ...
\r
9 def wrap(cls, exception, name=None): ...
\r
12 def get_description(self, environ=None): ...
\r
13 def get_body(self, environ=None): ...
\r
14 def get_headers(self, environ=None): ...
\r
15 def get_response(self, environ=None): ...
\r
16 def __call__(self, environ, start_response): ...
\r
18 default_exceptions: Dict[int, HTTPException]
\r
20 class BadRequest(HTTPException):
\r
21 code = ... # type: Any
\r
22 description = ... # type: Any
\r
24 class ClientDisconnected(BadRequest): ...
\r
25 class SecurityError(BadRequest): ...
\r
26 class BadHost(BadRequest): ...
\r
28 class Unauthorized(HTTPException):
\r
29 code = ... # type: Any
\r
30 description = ... # type: Any
\r
32 class Forbidden(HTTPException):
\r
33 code = ... # type: Any
\r
34 description = ... # type: Any
\r
36 class NotFound(HTTPException):
\r
37 code = ... # type: Any
\r
38 description = ... # type: Any
\r
40 class MethodNotAllowed(HTTPException):
\r
41 code = ... # type: Any
\r
42 description = ... # type: Any
\r
43 valid_methods = ... # type: Any
\r
44 def __init__(self, valid_methods=None, description=None): ...
\r
45 def get_headers(self, environ): ...
\r
47 class NotAcceptable(HTTPException):
\r
48 code = ... # type: Any
\r
49 description = ... # type: Any
\r
51 class RequestTimeout(HTTPException):
\r
52 code = ... # type: Any
\r
53 description = ... # type: Any
\r
55 class Conflict(HTTPException):
\r
56 code = ... # type: Any
\r
57 description = ... # type: Any
\r
59 class Gone(HTTPException):
\r
60 code = ... # type: Any
\r
61 description = ... # type: Any
\r
63 class LengthRequired(HTTPException):
\r
64 code = ... # type: Any
\r
65 description = ... # type: Any
\r
67 class PreconditionFailed(HTTPException):
\r
68 code = ... # type: Any
\r
69 description = ... # type: Any
\r
71 class RequestEntityTooLarge(HTTPException):
\r
72 code = ... # type: Any
\r
73 description = ... # type: Any
\r
75 class RequestURITooLarge(HTTPException):
\r
76 code = ... # type: Any
\r
77 description = ... # type: Any
\r
79 class UnsupportedMediaType(HTTPException):
\r
80 code = ... # type: Any
\r
81 description = ... # type: Any
\r
83 class RequestedRangeNotSatisfiable(HTTPException):
\r
84 code = ... # type: Any
\r
85 description = ... # type: Any
\r
86 length = ... # type: Any
\r
87 units = ... # type: Any
\r
88 def __init__(self, length=None, units='', description=None): ...
\r
89 def get_headers(self, environ): ...
\r
91 class ExpectationFailed(HTTPException):
\r
92 code = ... # type: Any
\r
93 description = ... # type: Any
\r
95 class ImATeapot(HTTPException):
\r
96 code = ... # type: Any
\r
97 description = ... # type: Any
\r
99 class UnprocessableEntity(HTTPException):
\r
100 code = ... # type: Any
\r
101 description = ... # type: Any
\r
103 class Locked(HTTPException):
\r
104 code = ... # type: Any
\r
105 description = ... # type: Any
\r
107 class PreconditionRequired(HTTPException):
\r
108 code = ... # type: Any
\r
109 description = ... # type: Any
\r
111 class TooManyRequests(HTTPException):
\r
112 code = ... # type: Any
\r
113 description = ... # type: Any
\r
115 class RequestHeaderFieldsTooLarge(HTTPException):
\r
116 code = ... # type: Any
\r
117 description = ... # type: Any
\r
119 class UnavailableForLegalReasons(HTTPException):
\r
120 code = ... # type: Any
\r
121 description = ... # type: Any
\r
123 class InternalServerError(HTTPException):
\r
124 code = ... # type: Any
\r
125 description = ... # type: Any
\r
127 class NotImplemented(HTTPException):
\r
128 code = ... # type: Any
\r
129 description = ... # type: Any
\r
131 class BadGateway(HTTPException):
\r
132 code = ... # type: Any
\r
133 description = ... # type: Any
\r
135 class ServiceUnavailable(HTTPException):
\r
136 code = ... # type: Any
\r
137 description = ... # type: Any
\r
139 class GatewayTimeout(HTTPException):
\r
140 code = ... # type: Any
\r
141 description = ... # type: Any
\r
143 class HTTPVersionNotSupported(HTTPException):
\r
144 code = ... # type: Any
\r
145 description = ... # type: Any
\r
148 mapping = ... # type: Any
\r
149 def __init__(self, mapping=None, extra=None): ...
\r
150 def __call__(self, code, *args, **kwargs) -> NoReturn: ...
\r
152 def abort(status: Any, *args: Any, **kwargs: Any) -> NoReturn: ...
\r