autonomize-core 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

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.
@@ -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
  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
@@ -1,7 +1,7 @@
1
1
  autonomize/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  autonomize/core/__init__.py,sha256=Bc5MrXUgBLjByMP-iW1yCsFgQyNPgKxCvAKjogfdHgY,444
3
- autonomize/core/base_client.py,sha256=q2DWt8EwDH9ftXgzIyaSVh5cDUMFGlC0Qg2YGMHggD0,17475
4
- autonomize/core/credential.py,sha256=YICDNRfG_GTvjMaeQCDVAXHL34OUu8QpwT6PSXtGewQ,10210
3
+ autonomize/core/base_client.py,sha256=r2lyhz6RqB1fb8qt6YHOHfb3-nSl8tB_5D5Bf6vjH18,17824
4
+ autonomize/core/credential.py,sha256=1A4WEA8irscJ00PR2gp_gmDK5lQFDPD3u8e0taz9hGo,10521
5
5
  autonomize/exceptions/__init__.py,sha256=LS0jVRjHWYuIeFuSi7SNg5dwHmH9U3kvFWByiYSV7Hw,401
6
6
  autonomize/exceptions/core/__init__.py,sha256=5flhl7JoAxV-3ofkWxpW7Am0mrdZDB3RfmAKv5XhuXc,408
7
7
  autonomize/exceptions/core/credentials.py,sha256=2kPp10ktbZFnZEaEL8jU2a-BECwkZzPpS8d56fx6g_0,1451
@@ -11,7 +11,7 @@ autonomize/types/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
11
11
  autonomize/types/core/base_client.py,sha256=DcJPT9GJuvGoUoCu3xS63qZoCZaG97Iwc7pOmN0q_6w,223
12
12
  autonomize/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  autonomize/utils/logger.py,sha256=oQLM9pmQkHBQRN9c4hCXDBOf2BqHB06JjizIaWbNFfw,2168
14
- autonomize_core-0.1.5.dist-info/LICENSE,sha256=1BOgDsbiPB_RVAQMpdx88RIvXmu5u5X5bSd4aVhxUok,170
15
- autonomize_core-0.1.5.dist-info/METADATA,sha256=np04CQ8-JpVGumjxi7ezk9mY0T-QHLLtHE_Olh_obi0,3641
16
- autonomize_core-0.1.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
- autonomize_core-0.1.5.dist-info/RECORD,,
14
+ autonomize_core-0.1.6.dist-info/LICENSE,sha256=1BOgDsbiPB_RVAQMpdx88RIvXmu5u5X5bSd4aVhxUok,170
15
+ autonomize_core-0.1.6.dist-info/METADATA,sha256=7xn5safiNrckDQ1zBbSWPkJLH_mJM9BcGhp2uQ20zNw,3641
16
+ autonomize_core-0.1.6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
+ autonomize_core-0.1.6.dist-info/RECORD,,