We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1cf1464 + 3485447 commit 9a3b0d6Copy full SHA for 9a3b0d6
opa_client/base.py
@@ -23,6 +23,7 @@ def __init__(
23
ssl: bool = False,
24
cert: Optional[Union[str, tuple]] = None,
25
headers: Optional[dict] = None,
26
+ retries: int = 2,
27
timeout: float = 1.5,
28
):
29
if not isinstance(port, int):
@@ -34,15 +35,14 @@ def __init__(
34
35
self.ssl = ssl
36
self.cert = cert
37
self.timeout = timeout
38
+ self.retries = retries
39
40
self.schema = "https://" if ssl else "http://"
41
self.root_url = f"{self.schema}{self.host}:{self.port}/{self.version}"
42
43
self.headers = headers
44
45
self._session = None # Will be initialized in the subclass
- self.retries = 2
- self.timeout = 1.5
46
47
def _build_url(
48
self, path: str, query_params: Dict[str, str] = None
0 commit comments