autonomize-core 0.1.5__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: autonomize-core
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Autonomize Core contains the unified authentication source to access platform.
5
5
  License: Proprietary
6
6
  Author: Varun Prakash
@@ -3,7 +3,10 @@ This module contains the BaseClient class for handling common HTTP operations
3
3
  and token management using a simplified, credential-focused approach.
4
4
  """
5
5
 
6
+ # pylint: disable=C0301
7
+
6
8
  import os
9
+ import ssl
7
10
  from typing import Any, Dict, Optional
8
11
 
9
12
  import httpx
@@ -58,7 +61,13 @@ class BaseClient:
58
61
 
59
62
  # Other configuration
60
63
  self.timeout = timeout
64
+
65
+ # SSL configuration
61
66
  self.verify_ssl = verify_ssl
67
+ if isinstance(self.verify_ssl, str):
68
+ if os.path.isdir(self.verify_ssl):
69
+ self.verify_ssl = ssl.create_default_context(capath=self.verify_ssl)
70
+ self.verify_ssl = ssl.create_default_context(cafile=self.verify_ssl) # type: ignore[arg-type]
62
71
 
63
72
  # Create HTTP clients with retry configured
64
73
  self.client = self._setup_client()
@@ -1,10 +1,11 @@
1
1
  """ModelhubCredential Implementation"""
2
2
 
3
- # pylint: disable=line-too-long, invalid-name
3
+ # pylint: disable=line-too-long, invalid-name, duplicate-code
4
4
 
5
5
  import base64
6
6
  import json
7
7
  import os
8
+ import ssl
8
9
  import time
9
10
  from typing import Optional
10
11
 
@@ -96,6 +97,10 @@ class ModelhubCredential:
96
97
 
97
98
  # SSL Config
98
99
  self.verify_ssl = verify_ssl
100
+ if isinstance(self.verify_ssl, str):
101
+ if os.path.isdir(self.verify_ssl):
102
+ self.verify_ssl = ssl.create_default_context(capath=self.verify_ssl)
103
+ self.verify_ssl = ssl.create_default_context(cafile=self.verify_ssl) # type: ignore[arg-type]
99
104
 
100
105
  # Validate credentials
101
106
  if self._client_id is None or self._client_secret is None:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "autonomize-core"
3
- version = "0.1.5"
3
+ version = "0.1.6"
4
4
  description = "Autonomize Core contains the unified authentication source to access platform."
5
5
  authors = ["Varun Prakash <varun.prakash@autonomize.ai>"]
6
6
  readme = "README.md"
File without changes