maleo-foundation 0.3.21__py3-none-any.whl → 0.3.25__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/models/transfers/general/settings.py +11 -39
- {maleo_foundation-0.3.21.dist-info → maleo_foundation-0.3.25.dist-info}/METADATA +1 -1
- {maleo_foundation-0.3.21.dist-info → maleo_foundation-0.3.25.dist-info}/RECORD +5 -5
- {maleo_foundation-0.3.21.dist-info → maleo_foundation-0.3.25.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.3.21.dist-info → maleo_foundation-0.3.25.dist-info}/top_level.txt +0 -0
@@ -41,49 +41,21 @@ class Settings(BaseSettings):
|
|
41
41
|
description="Public key"
|
42
42
|
)
|
43
43
|
|
44
|
-
@classmethod
|
45
|
-
@model_validator(mode="before")
|
46
|
-
def define_configurations_path(
|
47
|
-
cls,
|
48
|
-
values: BaseTypes.StringToAnyDict
|
49
|
-
) -> BaseTypes.StringToAnyDict:
|
50
|
-
# Define and check environment
|
51
|
-
environment: BaseTypes.OptionalString = values.get("ENVIRONMENT", None)
|
52
|
-
if environment is None:
|
53
|
-
raise ValueError("'ENVIRONMENT' variable not defined/found")
|
54
|
-
|
55
|
-
# Define and check service key
|
56
|
-
service_key: BaseTypes.OptionalString = values.get("SERVICE_KEY", None)
|
57
|
-
if service_key is None:
|
58
|
-
raise ValueError("'SERVICE_KEY' variable not defined/found")
|
59
|
-
|
60
|
-
# Define and check use local static configurations
|
61
|
-
use_local_static_configurations: BaseTypes.OptionalBoolean = values.get("USE_LOCAL_STATIC_CONFIGURATIONS", None)
|
62
|
-
if use_local_static_configurations is None:
|
63
|
-
raise ValueError("'USE_LOCAL_STATIC_CONFIGURATIONS' variable not defined/found")
|
64
|
-
|
65
|
-
# Define static configurations path if necessary
|
66
|
-
static_configurations_path: BaseTypes.OptionalString = values.get("STATIC_CONFIGURATIONS_PATH", None)
|
67
|
-
if use_local_static_configurations and static_configurations_path is None:
|
68
|
-
values["STATIC_CONFIGURATIONS_PATH"] = f"/maleo-static-configurations-{environment}.yaml"
|
69
|
-
|
70
|
-
# Define and check use local runtime configurations
|
71
|
-
use_local_runtime_configurations: BaseTypes.OptionalBoolean = values.get("USE_LOCAL_RUNTIME_CONFIGURATIONS", None)
|
72
|
-
if use_local_runtime_configurations is None:
|
73
|
-
raise ValueError("'USE_LOCAL_RUNTIME_CONFIGURATIONS' variable not defined/found")
|
74
|
-
|
75
|
-
# Define runtime configurations path if necessary
|
76
|
-
runtime_configurations_path: BaseTypes.OptionalString = values.get("RUNTIME_CONFIGURATIONS_PATH", None)
|
77
|
-
if use_local_runtime_configurations and runtime_configurations_path is None:
|
78
|
-
values["RUNTIME_CONFIGURATIONS_PATH"] = f"/{service_key}-runtime-configurations-{environment}.yaml"
|
79
|
-
|
80
|
-
return values
|
81
|
-
|
82
44
|
@model_validator(mode="after")
|
83
45
|
def validate_configurations_path(self) -> Self:
|
46
|
+
if self.USE_LOCAL_STATIC_CONFIGURATIONS and self.STATIC_CONFIGURATIONS_PATH is None:
|
47
|
+
self.STATIC_CONFIGURATIONS_PATH = (
|
48
|
+
f"/static-configurations/maleo-static-configurations-{self.ENVIRONMENT}.yaml"
|
49
|
+
)
|
50
|
+
|
84
51
|
if self.USE_LOCAL_STATIC_CONFIGURATIONS and self.STATIC_CONFIGURATIONS_PATH is None:
|
85
52
|
raise ValueError("Static configurations path must exist if use local static configurations is set to true")
|
86
|
-
|
53
|
+
|
54
|
+
if self.USE_LOCAL_RUNTIME_CONFIGURATIONS and self.RUNTIME_CONFIGURATIONS_PATH is None:
|
55
|
+
self.RUNTIME_CONFIGURATIONS_PATH = (
|
56
|
+
f"/runtime-configurations/{self.SERVICE_KEY}-runtime-configurations-{self.ENVIRONMENT}.yaml"
|
57
|
+
)
|
58
|
+
|
87
59
|
if self.USE_LOCAL_RUNTIME_CONFIGURATIONS and self.RUNTIME_CONFIGURATIONS_PATH is None:
|
88
60
|
raise ValueError("Runtime configurations path must exist if use local runtime configurations is set to true")
|
89
61
|
|
@@ -68,7 +68,7 @@ maleo_foundation/models/transfers/general/credentials.py,sha256=kLS0ymFipQmL3QaA
|
|
68
68
|
maleo_foundation/models/transfers/general/database.py,sha256=bFNPd-1x3jNHPscwCk0besnpwartAeLY2e5PfKVyI4M,1201
|
69
69
|
maleo_foundation/models/transfers/general/key.py,sha256=S37SqD3qwTbgMk7785hW7Kl9d4Kouh4uPZcGoyMQ_-Q,755
|
70
70
|
maleo_foundation/models/transfers/general/request.py,sha256=xOeBbtXygK5P6DxPyf3C4LIH3nb262tqWsgvALB4yfQ,1792
|
71
|
-
maleo_foundation/models/transfers/general/settings.py,sha256=
|
71
|
+
maleo_foundation/models/transfers/general/settings.py,sha256=q3ljAuvLmzXD2vE9QdYDT6VNeqM5sjm1iZMhm1xB40g,2548
|
72
72
|
maleo_foundation/models/transfers/general/signature.py,sha256=J9xQy2HjpCQOnES7RJqsUnDgjFPuakQ1mxyfdTdstSE,297
|
73
73
|
maleo_foundation/models/transfers/general/token.py,sha256=PU-_wLFaY2i8pwRi9-jlk4nh7XzoTKOk0BEsUCGbD80,4979
|
74
74
|
maleo_foundation/models/transfers/general/configurations/__init__.py,sha256=DMiBLOnA4Ye2q0-n0EyUU6U8YbpyqRn1l_vl4kuMKAI,2042
|
@@ -133,7 +133,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
|
|
133
133
|
maleo_foundation/utils/loaders/credential/google.py,sha256=ZglnLdW3lHmaKER4mwGe5N5ERus-bdsamfpwGmQYPIo,6344
|
134
134
|
maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
|
135
135
|
maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
|
136
|
-
maleo_foundation-0.3.
|
137
|
-
maleo_foundation-0.3.
|
138
|
-
maleo_foundation-0.3.
|
139
|
-
maleo_foundation-0.3.
|
136
|
+
maleo_foundation-0.3.25.dist-info/METADATA,sha256=MiUXG1VvGaLcBiJqBwqmdWINhODbZYCr9t6gNLWUQk0,3740
|
137
|
+
maleo_foundation-0.3.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
138
|
+
maleo_foundation-0.3.25.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
139
|
+
maleo_foundation-0.3.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|