maleo-foundation 0.3.5__py3-none-any.whl → 0.3.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.
- maleo_foundation/managers/configuration.py +2 -0
- maleo_foundation/utils/loaders/credential/google.py +27 -27
- {maleo_foundation-0.3.5.dist-info → maleo_foundation-0.3.6.dist-info}/METADATA +1 -1
- {maleo_foundation-0.3.5.dist-info → maleo_foundation-0.3.6.dist-info}/RECORD +6 -6
- {maleo_foundation-0.3.5.dist-info → maleo_foundation-0.3.6.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.3.5.dist-info → maleo_foundation-0.3.6.dist-info}/top_level.txt +0 -0
@@ -26,6 +26,8 @@ class ConfigurationManager:
|
|
26
26
|
self.settings = settings
|
27
27
|
self.credential_manager = credential_manager
|
28
28
|
|
29
|
+
self._load_configs()
|
30
|
+
|
29
31
|
def _load_static_configurations(self) -> StaticConfigurations:
|
30
32
|
config_path = Path(self.settings.STATIC_CONFIGURATIONS_PATH)
|
31
33
|
|
@@ -5,34 +5,34 @@ from google.oauth2.service_account import Credentials
|
|
5
5
|
from pathlib import Path
|
6
6
|
from typing import Optional, Union
|
7
7
|
|
8
|
-
class GoogleCredentialsLoader:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
8
|
+
# class GoogleCredentialsLoader:
|
9
|
+
# @staticmethod
|
10
|
+
# def load(
|
11
|
+
# credentials_path: Optional[Union[Path, str]] = None
|
12
|
+
# ) -> Credentials:
|
13
|
+
# """
|
14
|
+
# Load Google credentials either from a service account file or from the default credentials.
|
15
|
+
# Priority:
|
16
|
+
# 1. Explicit path argument
|
17
|
+
# 2. GOOGLE_CREDENTIALS_PATH environment variable
|
18
|
+
# 3. google.auth.default()
|
19
|
+
# """
|
20
|
+
# if credentials_path is None:
|
21
|
+
# credentials_path = os.getenv("GOOGLE_CREDENTIALS_PATH")
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
# if credentials_path is not None:
|
24
|
+
# credentials_path = Path(credentials_path)
|
25
|
+
# if credentials_path.exists() and credentials_path.is_file():
|
26
|
+
# try:
|
27
|
+
# return Credentials.from_service_account_file(str(credentials_path))
|
28
|
+
# except Exception as e:
|
29
|
+
# raise ValueError(f"Failed to load credentials from file: {str(e)}")
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# try:
|
32
|
+
# credentials, _ = default()
|
33
|
+
# return credentials
|
34
|
+
# except Exception as e:
|
35
|
+
# raise ValueError(f"Failed to load default credentials: {str(e)}")
|
36
36
|
|
37
37
|
class GoogleCredentialsLoader:
|
38
38
|
@staticmethod
|
@@ -121,7 +121,7 @@ class GoogleCredentialsLoader:
|
|
121
121
|
# Default credentials are not service account credentials
|
122
122
|
raise ValueError(
|
123
123
|
"Default credentials are not service account credentials. "
|
124
|
-
f"Found credentials of type: {type(credentials)
|
124
|
+
f"Found credentials of type: {type(credentials)}. "
|
125
125
|
"Please provide a service account key file via GOOGLE_CREDENTIALS_PATH, "
|
126
126
|
"GOOGLE_APPLICATION_CREDENTIALS, or the credentials_path parameter."
|
127
127
|
)
|
@@ -33,7 +33,7 @@ maleo_foundation/expanded_types/encryption/aes.py,sha256=1rj43qjIO0TePpr1mErT_NJ
|
|
33
33
|
maleo_foundation/expanded_types/encryption/rsa.py,sha256=Esf_H8nMz2kOLAWa3M7dlD-sFdFIZylNjB_qB20Yaww,488
|
34
34
|
maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
maleo_foundation/managers/cache.py,sha256=91IvQGCXC3QkhB61m6qLDMaRykmMYOwzMgrSOodfY1A,257
|
36
|
-
maleo_foundation/managers/configuration.py,sha256=
|
36
|
+
maleo_foundation/managers/configuration.py,sha256=hffeNqAuqRTPVv7ZBT7jOC95blfgn5fNCxFPZnl-WSQ,3980
|
37
37
|
maleo_foundation/managers/credential.py,sha256=pTsd1sPFw64cOfSffqsdJFkVfsciqxjAvvt6RZJCkDY,3116
|
38
38
|
maleo_foundation/managers/db.py,sha256=y5oP3bTXKeXYKqng-E_HZ-3wC0ZPtl5bls0AEEej6zM,6050
|
39
39
|
maleo_foundation/managers/middleware.py,sha256=ecTNloglV67xoC_hqIEMIxhfQwzXRKHLI3ThJdd-lbY,2480
|
@@ -131,10 +131,10 @@ maleo_foundation/utils/loaders/__init__.py,sha256=P_3ycGfeDXFjAi8bE4iLWHxBveqUId
|
|
131
131
|
maleo_foundation/utils/loaders/json.py,sha256=Uw8v_nfkNMPvcpDYrFwqZBkACyxWzzd6M7klhHbo5JI,508
|
132
132
|
maleo_foundation/utils/loaders/yaml.py,sha256=V2AMjkwoxi1awdahifjtEALvUZ11VL9pZWGtQ7qrNJs,503
|
133
133
|
maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg7rejnG4I684FjUwh70tvhtVM,141
|
134
|
-
maleo_foundation/utils/loaders/credential/google.py,sha256=
|
134
|
+
maleo_foundation/utils/loaders/credential/google.py,sha256=2KLXU2-xbLbPqPQ9EKYo-tl69FRH16nEBnb5qHzHKXs,7694
|
135
135
|
maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
|
136
136
|
maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
|
137
|
-
maleo_foundation-0.3.
|
138
|
-
maleo_foundation-0.3.
|
139
|
-
maleo_foundation-0.3.
|
140
|
-
maleo_foundation-0.3.
|
137
|
+
maleo_foundation-0.3.6.dist-info/METADATA,sha256=rfsGGGGh3mDISAV_r1uN86rJ0tfGNme7s7z2x0c8l8s,3739
|
138
|
+
maleo_foundation-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
139
|
+
maleo_foundation-0.3.6.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
140
|
+
maleo_foundation-0.3.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|