Skip to content

Commit 229fb2b

Browse files
committed
Added docblocks
1 parent f552cd6 commit 229fb2b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

redis/http/http_client.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,29 @@ def __init__(
8686
auth_basic: Optional[Tuple[str, str]] = None, # (username, password)
8787
user_agent: str = DEFAULT_USER_AGENT,
8888
) -> None:
89+
"""
90+
Initialize a new HTTP client instance.
91+
92+
Args:
93+
base_url: Base URL for all requests. Will be prefixed to all paths.
94+
headers: Default headers to include in all requests.
95+
timeout: Default timeout in seconds for requests.
96+
retry: Retry configuration for failed requests.
97+
verify_tls: Whether to verify TLS certificates.
98+
ca_file: Path to CA certificate file for TLS verification.
99+
ca_path: Path to a directory containing CA certificates.
100+
ca_data: CA certificate data as string or bytes.
101+
client_cert_file: Path to client certificate for mutual TLS.
102+
client_key_file: Path to a client private key for mutual TLS.
103+
client_key_password: Password for an encrypted client private key.
104+
auth_basic: Tuple of (username, password) for HTTP basic auth.
105+
user_agent: User-Agent header value for requests.
106+
107+
The client supports both regular HTTPS with server verification and mutual TLS
108+
authentication. For server verification, provide CA certificate information via
109+
ca_file, ca_path or ca_data. For mutual TLS, additionally provide a client
110+
certificate and key via client_cert_file and client_key_file.
111+
"""
89112
self.base_url = base_url.rstrip("/") + "/" if base_url and not base_url.endswith("/") else base_url
90113
self._default_headers = {k.lower(): v for k, v in (headers or {}).items()}
91114
self.timeout = timeout

redis/multidb/healthcheck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ def __init__(
103103
client_key_file: Path to client private key file for mutual TLS
104104
client_key_password: Password for encrypted client private key
105105
"""
106-
107106
super().__init__(
108107
retry=retry,
109108
)

0 commit comments

Comments
 (0)