massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2 / tornado / web.pyi
1 from typing import Any\r
2 from tornado import httputil\r
3 \r
4 MIN_SUPPORTED_SIGNED_VALUE_VERSION = ...  # type: Any\r
5 MAX_SUPPORTED_SIGNED_VALUE_VERSION = ...  # type: Any\r
6 DEFAULT_SIGNED_VALUE_VERSION = ...  # type: Any\r
7 DEFAULT_SIGNED_VALUE_MIN_VERSION = ...  # type: Any\r
8 \r
9 class RequestHandler:\r
10     SUPPORTED_METHODS = ...  # type: Any\r
11     application = ...  # type: Any\r
12     request = ...  # type: Any\r
13     path_args = ...  # type: Any\r
14     path_kwargs = ...  # type: Any\r
15     ui = ...  # type: Any\r
16     def __init__(self, application, request, **kwargs) -> None: ...\r
17     def initialize(self): ...\r
18     @property\r
19     def settings(self): ...\r
20     def head(self, *args, **kwargs): ...\r
21     def get(self, *args, **kwargs): ...\r
22     def post(self, *args, **kwargs): ...\r
23     def delete(self, *args, **kwargs): ...\r
24     def patch(self, *args, **kwargs): ...\r
25     def put(self, *args, **kwargs): ...\r
26     def options(self, *args, **kwargs): ...\r
27     def prepare(self): ...\r
28     def on_finish(self): ...\r
29     def on_connection_close(self): ...\r
30     def clear(self): ...\r
31     def set_default_headers(self): ...\r
32     def set_status(self, status_code, reason=...): ...\r
33     def get_status(self): ...\r
34     def set_header(self, name, value): ...\r
35     def add_header(self, name, value): ...\r
36     def clear_header(self, name): ...\r
37     def get_argument(self, name, default=..., strip=...): ...\r
38     def get_arguments(self, name, strip=...): ...\r
39     def get_body_argument(self, name, default=..., strip=...): ...\r
40     def get_body_arguments(self, name, strip=...): ...\r
41     def get_query_argument(self, name, default=..., strip=...): ...\r
42     def get_query_arguments(self, name, strip=...): ...\r
43     def decode_argument(self, value, name=...): ...\r
44     @property\r
45     def cookies(self): ...\r
46     def get_cookie(self, name, default=...): ...\r
47     def set_cookie(self, name, value, domain=..., expires=..., path=..., expires_days=..., **kwargs): ...\r
48     def clear_cookie(self, name, path=..., domain=...): ...\r
49     def clear_all_cookies(self, path=..., domain=...): ...\r
50     def set_secure_cookie(self, name, value, expires_days=..., version=..., **kwargs): ...\r
51     def create_signed_value(self, name, value, version=...): ...\r
52     def get_secure_cookie(self, name, value=..., max_age_days=..., min_version=...): ...\r
53     def get_secure_cookie_key_version(self, name, value=...): ...\r
54     def redirect(self, url, permanent=..., status=...): ...\r
55     def write(self, chunk): ...\r
56     def render(self, template_name, **kwargs): ...\r
57     def render_string(self, template_name, **kwargs): ...\r
58     def get_template_namespace(self): ...\r
59     def create_template_loader(self, template_path): ...\r
60     def flush(self, include_footers=..., callback=...): ...\r
61     def finish(self, chunk=...): ...\r
62     def send_error(self, status_code=..., **kwargs): ...\r
63     def write_error(self, status_code, **kwargs): ...\r
64     @property\r
65     def locale(self): ...\r
66     @locale.setter\r
67     def locale(self, value): ...\r
68     def get_user_locale(self): ...\r
69     def get_browser_locale(self, default=...): ...\r
70     @property\r
71     def current_user(self): ...\r
72     @current_user.setter\r
73     def current_user(self, value): ...\r
74     def get_current_user(self): ...\r
75     def get_login_url(self): ...\r
76     def get_template_path(self): ...\r
77     @property\r
78     def xsrf_token(self): ...\r
79     def check_xsrf_cookie(self): ...\r
80     def xsrf_form_html(self): ...\r
81     def static_url(self, path, include_host=..., **kwargs): ...\r
82     def require_setting(self, name, feature=...): ...\r
83     def reverse_url(self, name, *args): ...\r
84     def compute_etag(self): ...\r
85     def set_etag_header(self): ...\r
86     def check_etag_header(self): ...\r
87     def data_received(self, chunk): ...\r
88     def log_exception(self, typ, value, tb): ...\r
89 \r
90 def asynchronous(method): ...\r
91 def stream_request_body(cls): ...\r
92 def removeslash(method): ...\r
93 def addslash(method): ...\r
94 \r
95 class Application(httputil.HTTPServerConnectionDelegate):\r
96     transforms = ...  # type: Any\r
97     handlers = ...  # type: Any\r
98     named_handlers = ...  # type: Any\r
99     default_host = ...  # type: Any\r
100     settings = ...  # type: Any\r
101     ui_modules = ...  # type: Any\r
102     ui_methods = ...  # type: Any\r
103     def __init__(self, handlers=..., default_host=..., transforms=..., **settings) -> None: ...\r
104     def listen(self, port, address=..., **kwargs): ...\r
105     def add_handlers(self, host_pattern, host_handlers): ...\r
106     def add_transform(self, transform_class): ...\r
107     def start_request(self, server_conn, request_conn): ...\r
108     def __call__(self, request): ...\r
109     def reverse_url(self, name, *args): ...\r
110     def log_request(self, handler): ...\r
111 \r
112 class _RequestDispatcher(httputil.HTTPMessageDelegate):\r
113     application = ...  # type: Any\r
114     connection = ...  # type: Any\r
115     request = ...  # type: Any\r
116     chunks = ...  # type: Any\r
117     handler_class = ...  # type: Any\r
118     handler_kwargs = ...  # type: Any\r
119     path_args = ...  # type: Any\r
120     path_kwargs = ...  # type: Any\r
121     def __init__(self, application, connection) -> None: ...\r
122     def headers_received(self, start_line, headers): ...\r
123     stream_request_body = ...  # type: Any\r
124     def set_request(self, request): ...\r
125     def data_received(self, data): ...\r
126     def finish(self): ...\r
127     def on_connection_close(self): ...\r
128     handler = ...  # type: Any\r
129     def execute(self): ...\r
130 \r
131 class HTTPError(Exception):\r
132     status_code = ...  # type: Any\r
133     log_message = ...  # type: Any\r
134     args = ...  # type: Any\r
135     reason = ...  # type: Any\r
136     def __init__(self, status_code, log_message=..., *args, **kwargs) -> None: ...\r
137 \r
138 class Finish(Exception): ...\r
139 \r
140 class MissingArgumentError(HTTPError):\r
141     arg_name = ...  # type: Any\r
142     def __init__(self, arg_name) -> None: ...\r
143 \r
144 class ErrorHandler(RequestHandler):\r
145     def initialize(self, status_code): ...\r
146     def prepare(self): ...\r
147     def check_xsrf_cookie(self): ...\r
148 \r
149 class RedirectHandler(RequestHandler):\r
150     def initialize(self, url, permanent=...): ...\r
151     def get(self): ...\r
152 \r
153 class StaticFileHandler(RequestHandler):\r
154     CACHE_MAX_AGE = ...  # type: Any\r
155     root = ...  # type: Any\r
156     default_filename = ...  # type: Any\r
157     def initialize(self, path, default_filename=...): ...\r
158     @classmethod\r
159     def reset(cls): ...\r
160     def head(self, path): ...\r
161     path = ...  # type: Any\r
162     absolute_path = ...  # type: Any\r
163     modified = ...  # type: Any\r
164     def get(self, path, include_body=...): ...\r
165     def compute_etag(self): ...\r
166     def set_headers(self): ...\r
167     def should_return_304(self): ...\r
168     @classmethod\r
169     def get_absolute_path(cls, root, path): ...\r
170     def validate_absolute_path(self, root, absolute_path): ...\r
171     @classmethod\r
172     def get_content(cls, abspath, start=..., end=...): ...\r
173     @classmethod\r
174     def get_content_version(cls, abspath): ...\r
175     def get_content_size(self): ...\r
176     def get_modified_time(self): ...\r
177     def get_content_type(self): ...\r
178     def set_extra_headers(self, path): ...\r
179     def get_cache_time(self, path, modified, mime_type): ...\r
180     @classmethod\r
181     def make_static_url(cls, settings, path, include_version=...): ...\r
182     def parse_url_path(self, url_path): ...\r
183     @classmethod\r
184     def get_version(cls, settings, path): ...\r
185 \r
186 class FallbackHandler(RequestHandler):\r
187     fallback = ...  # type: Any\r
188     def initialize(self, fallback): ...\r
189     def prepare(self): ...\r
190 \r
191 class OutputTransform:\r
192     def __init__(self, request) -> None: ...\r
193     def transform_first_chunk(self, status_code, headers, chunk, finishing): ...\r
194     def transform_chunk(self, chunk, finishing): ...\r
195 \r
196 class GZipContentEncoding(OutputTransform):\r
197     CONTENT_TYPES = ...  # type: Any\r
198     MIN_LENGTH = ...  # type: Any\r
199     def __init__(self, request) -> None: ...\r
200     def transform_first_chunk(self, status_code, headers, chunk, finishing): ...\r
201     def transform_chunk(self, chunk, finishing): ...\r
202 \r
203 def authenticated(method): ...\r
204 \r
205 class UIModule:\r
206     handler = ...  # type: Any\r
207     request = ...  # type: Any\r
208     ui = ...  # type: Any\r
209     locale = ...  # type: Any\r
210     def __init__(self, handler) -> None: ...\r
211     @property\r
212     def current_user(self): ...\r
213     def render(self, *args, **kwargs): ...\r
214     def embedded_javascript(self): ...\r
215     def javascript_files(self): ...\r
216     def embedded_css(self): ...\r
217     def css_files(self): ...\r
218     def html_head(self): ...\r
219     def html_body(self): ...\r
220     def render_string(self, path, **kwargs): ...\r
221 \r
222 class _linkify(UIModule):\r
223     def render(self, text, **kwargs): ...\r
224 \r
225 class _xsrf_form_html(UIModule):\r
226     def render(self): ...\r
227 \r
228 class TemplateModule(UIModule):\r
229     def __init__(self, handler) -> None: ...\r
230     def render(self, path, **kwargs): ...\r
231     def embedded_javascript(self): ...\r
232     def javascript_files(self): ...\r
233     def embedded_css(self): ...\r
234     def css_files(self): ...\r
235     def html_head(self): ...\r
236     def html_body(self): ...\r
237 \r
238 class _UIModuleNamespace:\r
239     handler = ...  # type: Any\r
240     ui_modules = ...  # type: Any\r
241     def __init__(self, handler, ui_modules) -> None: ...\r
242     def __getitem__(self, key): ...\r
243     def __getattr__(self, key): ...\r
244 \r
245 class URLSpec:\r
246     regex = ...  # type: Any\r
247     handler_class = ...  # type: Any\r
248     kwargs = ...  # type: Any\r
249     name = ...  # type: Any\r
250     def __init__(self, pattern, handler, kwargs=..., name=...) -> None: ...\r
251     def reverse(self, *args): ...\r
252 \r
253 url = ...  # type: Any\r
254 \r
255 def create_signed_value(secret, name, value, version=..., clock=..., key_version=...): ...\r
256 def decode_signed_value(secret, name, value, max_age_days=..., clock=..., min_version=...): ...\r
257 def get_signature_key_version(value): ...\r