1 from _typeshed import SupportsRead
2 from _typeshed.wsgi import InputStream, WSGIEnvironment
3 from typing import Any, Iterable, Text
5 from .middleware.dispatcher import DispatcherMiddleware as DispatcherMiddleware
6 from .middleware.http_proxy import ProxyMiddleware as ProxyMiddleware
7 from .middleware.shared_data import SharedDataMiddleware as SharedDataMiddleware
11 environ, root_only: bool = ..., strip_querystring: bool = ..., host_only: bool = ..., trusted_hosts: Any | None = ...
13 def host_is_trusted(hostname, trusted_list): ...
14 def get_host(environ, trusted_hosts: Any | None = ...): ...
15 def get_content_length(environ: WSGIEnvironment) -> int | None: ...
16 def get_input_stream(environ: WSGIEnvironment, safe_fallback: bool = ...) -> InputStream: ...
17 def get_query_string(environ): ...
18 def get_path_info(environ, charset: Text = ..., errors: Text = ...): ...
19 def get_script_name(environ, charset: Text = ..., errors: Text = ...): ...
20 def pop_path_info(environ, charset: Text = ..., errors: Text = ...): ...
21 def peek_path_info(environ, charset: Text = ..., errors: Text = ...): ...
22 def extract_path_info(
23 environ_or_baseurl, path_or_url, charset: Text = ..., errors: Text = ..., collapse_http_schemes: bool = ...
26 class ClosingIterator:
27 def __init__(self, iterable, callbacks: Any | None = ...): ...
28 def __iter__(self): ...
29 def __next__(self): ...
32 def wrap_file(environ: WSGIEnvironment, file: SupportsRead[bytes], buffer_size: int = ...) -> Iterable[bytes]: ...
35 file: SupportsRead[bytes]
37 def __init__(self, file: SupportsRead[bytes], buffer_size: int = ...) -> None: ...
38 def close(self) -> None: ...
39 def seekable(self) -> bool: ...
40 def seek(self, offset: int, whence: int = ...) -> None: ...
41 def tell(self) -> int | None: ...
42 def __iter__(self) -> FileWrapper: ...
43 def __next__(self) -> bytes: ...
53 def __init__(self, iterable, start_byte: int = ..., byte_range: Any | None = ...): ...
54 def __iter__(self): ...
55 def __next__(self): ...
58 def make_line_iter(stream, limit: Any | None = ..., buffer_size=..., cap_at_buffer: bool = ...): ...
59 def make_chunk_iter(stream, separator, limit: Any | None = ..., buffer_size=..., cap_at_buffer: bool = ...): ...
63 def __init__(self, stream, limit): ...
64 def __iter__(self): ...
66 def is_exhausted(self): ...
67 def on_exhausted(self): ...
68 def on_disconnect(self): ...
69 def exhaust(self, chunk_size=...): ...
70 def read(self, size: Any | None = ...): ...
71 def readline(self, size: Any | None = ...): ...
72 def readlines(self, size: Any | None = ...): ...
74 def __next__(self): ...