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.
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/PKG-INFO +1 -1
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/core/base_client.py +9 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/core/credential.py +6 -1
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/pyproject.toml +1 -1
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/LICENSE +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/README.md +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/core/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/exceptions/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/exceptions/core/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/exceptions/core/credentials.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/py.typed +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/types/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/types/core/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/types/core/base_client.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/utils/__init__.py +0 -0
- {autonomize_core-0.1.5 → autonomize_core-0.1.6}/autonomize/utils/logger.py +0 -0
@@ -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:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|