Files
@ b76300a0229a
Branch filter:
Location: light9/stubs/cyclone/web.pyi
b76300a0229a
7.3 KiB
text/plain
megaflash strobe
Ignore-this: bb96664ba93cd2885f0e99815a2d2e9
Ignore-this: bb96664ba93cd2885f0e99815a2d2e9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | # Stubs for cyclone.web (Python 3)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from twisted.internet import protocol
from typing import Any, List, Optional
from .httpserver import HTTPRequest
class RequestHandler:
SUPPORTED_METHODS: Any = ...
serialize_lists: bool = ...
no_keep_alive: bool = ...
xsrf_cookie_name: str = ...
application: Any = ...
request: HTTPRequest = ...
path_args: Any = ...
path_kwargs: Any = ...
ui: Any = ...
def __init__(self, application: Any, request: HTTPRequest, **kwargs: Any) -> None: ...
@property
def settings(self): ...
def default(self, *args: Any, **kwargs: Any) -> None: ...
def prepare(self) -> None: ...
def on_finish(self) -> None: ...
def on_connection_close(self, *args: Any, **kwargs: Any) -> None: ...
def clear(self) -> None: ...
def set_default_headers(self) -> None: ...
def set_status(self, status_code: Any, reason: Optional[Any] = ...) -> None: ...
def get_status(self): ...
def set_header(self, name: Any, value: Any) -> None: ...
def add_header(self, name: Any, value: Any) -> None: ...
def clear_header(self, name: Any) -> None: ...
def get_argument(self, name: Any, default: Any = ..., strip: bool = ...) -> str: ...
def get_arguments(self, name: Any, strip: bool = ...) -> List[str]: ...
def decode_argument(self, value: Any, name: Optional[Any] = ...): ...
@property
def cookies(self): ...
def get_cookie(self, name: Any, default: Optional[Any] = ...): ...
def set_cookie(self, name: Any, value: Any, domain: Optional[Any] = ..., expires: Optional[Any] = ..., path: str = ..., expires_days: Optional[Any] = ..., **kwargs: Any) -> None: ...
def clear_cookie(self, name: Any, path: str = ..., domain: Optional[Any] = ...) -> None: ...
def clear_all_cookies(self) -> None: ...
def set_secure_cookie(self, name: Any, value: Any, expires_days: int = ..., **kwargs: Any) -> None: ...
def create_signed_value(self, name: Any, value: Any): ...
def get_secure_cookie(self, name: Any, value: Optional[Any] = ..., max_age_days: int = ...): ...
def redirect(self, url: Any, permanent: bool = ..., status: Optional[Any] = ...) -> None: ...
def write(self, chunk: Any) -> None: ...
def render(self, template_name: Any, **kwargs: Any): ...
def render_string(self, template_name: Any, **kwargs: Any): ...
def get_template_namespace(self): ...
def create_template_loader(self, template_path: Any): ...
def flush(self, include_footers: bool = ...) -> None: ...
def notifyFinish(self): ...
def finish(self, chunk: Optional[Any] = ...) -> None: ...
def send_error(self, status_code: int = ..., **kwargs: Any) -> None: ...
def write_error(self, status_code: Any, **kwargs: Any) -> None: ...
@property
def locale(self): ...
def get_user_locale(self) -> None: ...
def get_browser_locale(self, default: str = ...): ...
@property
def current_user(self): ...
def get_current_user(self) -> None: ...
def get_login_url(self): ...
def get_template_path(self): ...
@property
def xsrf_token(self): ...
def check_xsrf_cookie(self) -> None: ...
def xsrf_form_html(self): ...
def static_url(self, path: Any, include_host: Optional[Any] = ...): ...
def async_callback(self, callback: Any, *args: Any, **kwargs: Any): ...
def require_setting(self, name: Any, feature: str = ...) -> None: ...
def reverse_url(self, name: Any, *args: Any, **kwargs: Any): ...
def compute_etag(self): ...
def asynchronous(method: Any): ...
def removeslash(method: Any): ...
def addslash(method: Any): ...
class Application(protocol.ServerFactory):
protocol: Any = ...
transforms: Any = ...
handlers: Any = ...
named_handlers: Any = ...
error_handler: Any = ...
default_host: Any = ...
settings: Any = ...
ui_modules: Any = ...
ui_methods: Any = ...
def __init__(self, handlers: Optional[Any] = ..., default_host: str = ..., transforms: Optional[Any] = ..., error_handler: Optional[Any] = ..., **settings: Any) -> None: ...
def add_handlers(self, host_pattern: Any, host_handlers: Any) -> None: ...
def add_transform(self, transform_class: Any) -> None: ...
def __call__(self, request: Any): ...
def reverse_url(self, name: Any, *args: Any, **kwargs: Any): ...
def log_request(self, handler: Any) -> None: ...
class HTTPError(Exception):
status_code: Any = ...
log_message: Any = ...
args: Any = ...
reason: Any = ...
def __init__(self, status_code: Any, log_message: Optional[Any] = ..., *args: Any, **kwargs: Any) -> None: ...
class HTTPAuthenticationRequired(HTTPError):
status_code: int = ...
log_message: Any = ...
auth_type: Any = ...
kwargs: Any = ...
def __init__(self, log_message: Optional[Any] = ..., auth_type: str = ..., realm: str = ..., **kwargs: Any) -> None: ...
class ErrorHandler(RequestHandler):
def initialize(self, status_code: Any) -> None: ...
def prepare(self) -> None: ...
def check_xsrf_cookie(self) -> None: ...
class RedirectHandler(RequestHandler):
def initialize(self, url: Any, permanent: bool = ...) -> None: ...
def get(self) -> None: ...
class StaticFileHandler(RequestHandler):
CACHE_MAX_AGE: Any = ...
root: Any = ...
default_filename: Any = ...
def initialize(self, path: Any, default_filename: Optional[Any] = ...) -> None: ...
@classmethod
def reset(cls) -> None: ...
def head(self, path: Any) -> None: ...
def get(self, path: Any, include_body: bool = ...) -> None: ...
def set_extra_headers(self, path: Any) -> None: ...
def get_cache_time(self, path: Any, modified: Any, mime_type: Any): ...
@classmethod
def make_static_url(cls, settings: Any, path: Any): ...
@classmethod
def get_version(cls, settings: Any, path: Any): ...
def parse_url_path(self, url_path: Any): ...
class FallbackHandler(RequestHandler):
fallback: Any = ...
def initialize(self, fallback: Any) -> None: ...
def prepare(self) -> None: ...
class OutputTransform:
def __init__(self, request: Any) -> None: ...
def transform_first_chunk(self, status_code: Any, headers: Any, chunk: Any, finishing: Any): ...
def transform_chunk(self, chunk: Any, finishing: Any): ...
class GZipContentEncoding(OutputTransform):
CONTENT_TYPES: Any = ...
MIN_LENGTH: int = ...
def __init__(self, request: Any) -> None: ...
def transform_first_chunk(self, status_code: Any, headers: Any, chunk: Any, finishing: Any): ...
def transform_chunk(self, chunk: Any, finishing: Any): ...
class ChunkedTransferEncoding(OutputTransform):
def __init__(self, request: Any) -> None: ...
def transform_first_chunk(self, status_code: Any, headers: Any, chunk: Any, finishing: Any): ...
def transform_chunk(self, block: Any, finishing: Any): ...
def authenticated(method: Any): ...
class URLReverseError(Exception): ...
class URLSpec:
regex: Any = ...
handler_class: Any = ...
kwargs: Any = ...
name: Any = ...
def __init__(self, pattern: Any, handler_class: Any, kwargs: Optional[Any] = ..., name: Optional[Any] = ...) -> None: ...
def reverse(self, *args: Any, **kwargs: Any): ...
url = URLSpec
def create_signed_value(secret: Any, name: Any, value: Any): ...
def decode_signed_value(secret: Any, name: Any, value: Any, max_age_days: int = ...): ...
|