1 from typing import Any, Mapping, Text, Type
5 HIREDIS_SUPPORTS_CALLABLE_ERRORS: Any
6 HIREDIS_SUPPORTS_BYTE_BUFFER: Any
8 HIREDIS_USE_BYTE_BUFFER: Any
13 SERVER_CLOSED_CONNECTION_ERROR: Any
16 EXCEPTION_CLASSES: Any
17 def parse_error(self, response): ...
23 def __init__(self, socket, socket_read_size, socket_timeout) -> None: ...
26 def read(self, length): ...
27 def readline(self): ...
30 def can_read(self, timeout): ...
32 class PythonParser(BaseParser):
35 def __init__(self, socket_read_size) -> None: ...
36 def __del__(self): ...
37 def on_connect(self, connection): ...
38 def on_disconnect(self): ...
39 def can_read(self, timeout): ...
40 def read_response(self): ...
42 class HiredisParser(BaseParser):
44 def __init__(self, socket_read_size) -> None: ...
45 def __del__(self): ...
46 def on_connect(self, connection): ...
47 def on_disconnect(self): ...
48 def can_read(self, timeout): ...
49 def read_from_socket(self, timeout=..., raise_on_timeout: bool = ...) -> bool: ...
50 def read_response(self): ...
55 def __init__(self, encoding, encoding_errors, decode_responses: bool) -> None: ...
56 def encode(self, value: Text | bytes | memoryview | bool | float) -> bytes: ...
57 def decode(self, value: Text | bytes | memoryview, force: bool = ...) -> Text: ...
60 description_format: Any
67 socket_connect_timeout: Any
69 socket_keepalive_options: Any
79 password: Text | None = ...,
80 socket_timeout: float | None = ...,
81 socket_connect_timeout: float | None = ...,
82 socket_keepalive: bool = ...,
83 socket_keepalive_options: Mapping[str, int | str] | None = ...,
84 socket_type: int = ...,
85 retry_on_timeout: bool = ...,
87 encoding_errors: Text = ...,
88 decode_responses: bool = ...,
89 parser_class: Type[BaseParser] = ...,
90 socket_read_size: int = ...,
91 health_check_interval: int = ...,
92 client_name: Text | None = ...,
93 username: Text | None = ...,
95 def __del__(self): ...
96 def register_connect_callback(self, callback): ...
97 def clear_connect_callbacks(self): ...
98 def connect(self): ...
99 def on_connect(self): ...
100 def disconnect(self): ...
101 def check_health(self) -> None: ...
102 def send_packed_command(self, command, check_health: bool = ...): ...
103 def send_command(self, *args): ...
104 def can_read(self, timeout=...): ...
105 def read_response(self): ...
106 def pack_command(self, *args): ...
107 def pack_commands(self, commands): ...
108 def repr_pieces(self) -> list[tuple[Text, Text]]: ...
110 class SSLConnection(Connection):
111 description_format: Any
117 self, ssl_keyfile=..., ssl_certfile=..., ssl_cert_reqs=..., ssl_ca_certs=..., ssl_check_hostname: bool = ..., **kwargs
120 class UnixDomainSocketConnection(Connection):
121 description_format: Any
127 retry_on_timeout: Any
130 decode_responses: Any
140 decode_responses=...,
141 retry_on_timeout=...,
143 socket_read_size: int = ...,
144 health_check_interval: int = ...,
147 def repr_pieces(self) -> list[tuple[Text, Text]]: ...
149 def to_bool(value: object) -> bool: ...
151 class ConnectionPool:
153 def from_url(cls, url: Text, db: int | None = ..., decode_components: bool = ..., **kwargs) -> ConnectionPool: ...
154 connection_class: Any
155 connection_kwargs: Any
157 def __init__(self, connection_class=..., max_connections=..., **connection_kwargs) -> None: ...
160 def get_connection(self, command_name, *keys, **options): ...
161 def make_connection(self): ...
162 def release(self, connection): ...
163 def disconnect(self, inuse_connections: bool = ...): ...
164 def get_encoder(self) -> Encoder: ...
165 def owns_connection(self, connection: Connection) -> bool: ...
167 class BlockingConnectionPool(ConnectionPool):
170 def __init__(self, max_connections=..., timeout=..., connection_class=..., queue_class=..., **connection_kwargs) -> None: ...
174 def make_connection(self): ...
175 def get_connection(self, command_name, *keys, **options): ...
176 def release(self, connection): ...
177 def disconnect(self): ...