Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opa_client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(
ssl: bool = False,
cert: Optional[Union[str, tuple]] = None,
headers: Optional[dict] = None,
retries: int = 2,
timeout: float = 1.5,
):
if not isinstance(port, int):
Expand All @@ -34,15 +35,14 @@ def __init__(
self.ssl = ssl
self.cert = cert
self.timeout = timeout
self.retries = retries

self.schema = "https://" if ssl else "http://"
self.root_url = f"{self.schema}{self.host}:{self.port}/{self.version}"

self.headers = headers

self._session = None # Will be initialized in the subclass
self.retries = 2
self.timeout = 1.5

def _build_url(
self, path: str, query_params: Dict[str, str] = None
Expand Down