maleo-foundation 0.3.69__py3-none-any.whl → 0.3.71__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 +11 -1
- maleo_foundation/managers/service.py +9 -1
- maleo_foundation/models/schemas/general.py +2 -6
- maleo_foundation/models/transfers/general/configurations/pubsub/publisher.py +26 -12
- {maleo_foundation-0.3.69.dist-info → maleo_foundation-0.3.71.dist-info}/METADATA +1 -1
- {maleo_foundation-0.3.69.dist-info → maleo_foundation-0.3.71.dist-info}/RECORD +8 -8
- {maleo_foundation-0.3.69.dist-info → maleo_foundation-0.3.71.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.3.69.dist-info → maleo_foundation-0.3.71.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,9 @@
|
|
1
1
|
from pathlib import Path
|
2
|
+
from typing import Optional
|
2
3
|
from maleo_foundation.models.transfers.general.configurations import Configurations
|
4
|
+
from maleo_foundation.models.transfers.general.configurations.pubsub.publisher import (
|
5
|
+
AdditionalTopicsConfigurations,
|
6
|
+
)
|
3
7
|
from maleo_foundation.models.transfers.general.settings import Settings
|
4
8
|
from maleo_foundation.utils.loaders.yaml import YAMLLoader
|
5
9
|
from .credential import CredentialManager
|
@@ -7,7 +11,10 @@ from .credential import CredentialManager
|
|
7
11
|
|
8
12
|
class ConfigurationManager:
|
9
13
|
def __init__(
|
10
|
-
self,
|
14
|
+
self,
|
15
|
+
settings: Settings,
|
16
|
+
credential_manager: CredentialManager,
|
17
|
+
additional_topics_configurations: Optional[AdditionalTopicsConfigurations],
|
11
18
|
) -> None:
|
12
19
|
self._settings = settings
|
13
20
|
self._credential_manager = credential_manager
|
@@ -27,6 +34,9 @@ class ConfigurationManager:
|
|
27
34
|
)
|
28
35
|
data = YAMLLoader.load_from_string(secret_data)
|
29
36
|
self._configurations = Configurations.model_validate(data)
|
37
|
+
self._configurations.pubsub.publisher.topics.additional = (
|
38
|
+
additional_topics_configurations
|
39
|
+
)
|
30
40
|
|
31
41
|
@property
|
32
42
|
def configurations(self) -> Configurations:
|
@@ -11,6 +11,9 @@ from typing import Optional
|
|
11
11
|
from maleo_foundation.client.manager import MaleoFoundationClientManager
|
12
12
|
from maleo_foundation.enums import BaseEnums
|
13
13
|
from maleo_foundation.models.schemas.general import BaseGeneralSchemas
|
14
|
+
from maleo_foundation.models.transfers.general.configurations.pubsub.publisher import (
|
15
|
+
AdditionalTopicsConfigurations,
|
16
|
+
)
|
14
17
|
from maleo_foundation.models.transfers.general.token import (
|
15
18
|
MaleoFoundationTokenGeneralTransfers,
|
16
19
|
)
|
@@ -49,6 +52,9 @@ class ServiceManager:
|
|
49
52
|
db_metadata: MetaData,
|
50
53
|
log_config: SimpleConfig,
|
51
54
|
settings: Optional[Settings] = None,
|
55
|
+
additional_topics_configurations: Optional[
|
56
|
+
AdditionalTopicsConfigurations
|
57
|
+
] = None,
|
52
58
|
):
|
53
59
|
self._db_metadata = db_metadata # * Declare DB Metadata
|
54
60
|
self._log_config = log_config # * Declare log config
|
@@ -67,7 +73,9 @@ class ServiceManager:
|
|
67
73
|
|
68
74
|
# * Initialize Configuration Manager
|
69
75
|
self._configuration_manager = ConfigurationManager(
|
70
|
-
settings=self._settings,
|
76
|
+
settings=self._settings,
|
77
|
+
credential_manager=self._credential_manager,
|
78
|
+
additional_topics_configurations=additional_topics_configurations,
|
71
79
|
)
|
72
80
|
|
73
81
|
self._load_keys()
|
@@ -139,12 +139,8 @@ class BaseGeneralSchemas:
|
|
139
139
|
|
140
140
|
class DatabaseOperationResult(BaseModel):
|
141
141
|
data_id: int = Field(..., ge=1, description="Data's ID")
|
142
|
-
old_data: BaseTypes.
|
143
|
-
|
144
|
-
)
|
145
|
-
new_data: BaseTypes.OptionalStringToAnyDict = Field(
|
146
|
-
None, description="New data"
|
147
|
-
)
|
142
|
+
old_data: BaseTypes.OptionalAny = Field(None, description="Old data")
|
143
|
+
new_data: BaseTypes.OptionalAny = Field(None, description="New data")
|
148
144
|
|
149
145
|
@model_validator(mode="after")
|
150
146
|
def validate_data(self) -> Self:
|
@@ -6,30 +6,44 @@ class TopicConfigurations(BaseModel):
|
|
6
6
|
id: str = Field(..., description="Topic's id")
|
7
7
|
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
DEFAULT_DATABASE_OPERATION_TOPIC_CONFIGURATIONS = TopicConfigurations(
|
10
|
+
id="database-operation"
|
11
|
+
)
|
12
12
|
|
13
13
|
DEFAULT_OPERATION_TOPIC_CONFIGURATIONS = TopicConfigurations(id="operation")
|
14
14
|
|
15
15
|
|
16
|
-
class
|
16
|
+
class SingleTopicsConfigurations(BaseModel):
|
17
17
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
default=DEFAULT_DATABASE_AUDIT_TOPIC_CONFIGURATIONS,
|
25
|
-
description="Database audit topic configurations",
|
19
|
+
|
20
|
+
class MandatoryTopicsConfigurations(SingleTopicsConfigurations):
|
21
|
+
database_operation: TopicConfigurations = Field(
|
22
|
+
default=DEFAULT_DATABASE_OPERATION_TOPIC_CONFIGURATIONS,
|
23
|
+
description="Database operation topic configurations",
|
26
24
|
)
|
27
|
-
operation:
|
25
|
+
operation: TopicConfigurations = Field(
|
28
26
|
default=DEFAULT_OPERATION_TOPIC_CONFIGURATIONS,
|
29
27
|
description="Operation topic configurations",
|
30
28
|
)
|
31
29
|
|
32
30
|
|
31
|
+
class AdditionalTopicsConfigurations(SingleTopicsConfigurations):
|
32
|
+
pass
|
33
|
+
|
34
|
+
|
35
|
+
class TopicsConfigurations(BaseModel):
|
36
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
37
|
+
|
38
|
+
mandatory: MandatoryTopicsConfigurations = Field(
|
39
|
+
default_factory=MandatoryTopicsConfigurations,
|
40
|
+
description="Mandatory topics configurations",
|
41
|
+
)
|
42
|
+
additional: Optional[AdditionalTopicsConfigurations] = Field(
|
43
|
+
default=None, description="Additional topics configurations"
|
44
|
+
)
|
45
|
+
|
46
|
+
|
33
47
|
class PublisherConfigurations(BaseModel):
|
34
48
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
35
49
|
|
@@ -32,11 +32,11 @@ maleo_foundation/expanded_types/encryption/aes.py,sha256=-MhdGWAGy-M1k3i-ZegQ9xZ
|
|
32
32
|
maleo_foundation/expanded_types/encryption/rsa.py,sha256=LJhZ6mnE4OB1eZnNTg21fv1cQVjXGV6xfA9dHPbPlLQ,495
|
33
33
|
maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
34
|
maleo_foundation/managers/cache.py,sha256=hML8vi2MXO2m2HeqB4eE6Ed4kl1iVXgEfpkB9tixs1Q,277
|
35
|
-
maleo_foundation/managers/configuration.py,sha256=
|
35
|
+
maleo_foundation/managers/configuration.py,sha256=JmJFvKB6xCPwb8iYpwuNMpdcHfwPJYLFgXYcWwewMj8,1740
|
36
36
|
maleo_foundation/managers/credential.py,sha256=um1M45deBEzTVfsUcpAtKEp3Rb_dH1qQrr8abkG_GeU,3057
|
37
37
|
maleo_foundation/managers/db.py,sha256=y0rQIg-vohhFUtck3v1LCdXov7XYjy9PFiCsVtcg8VI,6496
|
38
38
|
maleo_foundation/managers/middleware.py,sha256=Uglwt4X3MauKtBvbPTyHl0-32od3IN6AYYUtiUCoV9I,2464
|
39
|
-
maleo_foundation/managers/service.py,sha256=
|
39
|
+
maleo_foundation/managers/service.py,sha256=N8Dy0ppSdHIE3NXqmbwcXEIqgtMxnLHs8isVdKJbWAg,12398
|
40
40
|
maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
41
|
maleo_foundation/managers/client/base.py,sha256=iM5xZjLm5VQqqpiYcba-rifW0LgkVd-gRTE6XwdOFqY,4369
|
42
42
|
maleo_foundation/managers/client/maleo.py,sha256=aNh3I9EsxeD2rqx5WaXbZ5fjyyXVzvppHJiC98jJYfM,3163
|
@@ -54,7 +54,7 @@ maleo_foundation/models/responses.py,sha256=WNAz67ewOyWV0oHyiB_BF_-sfaoDF-FVzcwg
|
|
54
54
|
maleo_foundation/models/table.py,sha256=k0-OtahF2KRmvFUL8TborT6PoIhGsyoVrPJBKGg1QbU,1855
|
55
55
|
maleo_foundation/models/schemas/__init__.py,sha256=tmjBCyG4uMRjiTbnbhIjZaR8q7zk0_J_CqnRzsSfoBQ,279
|
56
56
|
maleo_foundation/models/schemas/encryption.py,sha256=S86FGlcBhyGxxZ5ObNSHTjSDwBUlUtLOMoCAKd5wE34,687
|
57
|
-
maleo_foundation/models/schemas/general.py,sha256=
|
57
|
+
maleo_foundation/models/schemas/general.py,sha256=jkwABGuocndShcX5RjDzdW56bVHT7hy8hCynvfkFgyk,10003
|
58
58
|
maleo_foundation/models/schemas/hash.py,sha256=jthDmu_VTBydffPruAIAiR8l0Xs6IrlgTptaP42zr1M,447
|
59
59
|
maleo_foundation/models/schemas/key.py,sha256=LSEDQpaCxavwp5je2O-ZNyOPtrFW_lXDywF9LK-An1w,622
|
60
60
|
maleo_foundation/models/schemas/parameter.py,sha256=OE1hg100lEa2IlGlT2Zz6PJ-OcC-6ZfDzsTOeJvvEig,3907
|
@@ -81,7 +81,7 @@ maleo_foundation/models/transfers/general/configurations/cache/redis.py,sha256=S
|
|
81
81
|
maleo_foundation/models/transfers/general/configurations/client/__init__.py,sha256=1w17i9CH4bSQ40o8rwIew2F_id25XklFqI1YPowcHvQ,356
|
82
82
|
maleo_foundation/models/transfers/general/configurations/client/maleo.py,sha256=0Hk6no800DdaAlv0SZ1OqVGxbp4LtJz1cJ0ZNbBejK4,2063
|
83
83
|
maleo_foundation/models/transfers/general/configurations/pubsub/__init__.py,sha256=BJqB2lxd7iFbm__3VKWPclE6ub_FMIVbhaO7yc2KzSU,505
|
84
|
-
maleo_foundation/models/transfers/general/configurations/pubsub/publisher.py,sha256=
|
84
|
+
maleo_foundation/models/transfers/general/configurations/pubsub/publisher.py,sha256=hDBkq__mbALJgiX1cOYi0V-3JitfoEOexjGAEbsJgo0,1596
|
85
85
|
maleo_foundation/models/transfers/parameters/__init__.py,sha256=HiV7hPn8rUaN7XeOwC_VugYQ4QQO7kbZ0fsp11GDznQ,355
|
86
86
|
maleo_foundation/models/transfers/parameters/client.py,sha256=2V1XvhSmIDDZL7MFVpD_dR5jWIoydQnFW67n9z6rRMA,4041
|
87
87
|
maleo_foundation/models/transfers/parameters/general.py,sha256=NUFsrrfByN9OX9QLYc2Bn0LpNPoxrKBuZae-IVhOiyo,791
|
@@ -138,7 +138,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=g-cAxkTE2EtHaG8Tv52
|
|
138
138
|
maleo_foundation/utils/loaders/credential/google.py,sha256=GCJl-bsKSSxoE_ERAkIzRrRNIbIEeqYOhHwzFuBr0mk,6576
|
139
139
|
maleo_foundation/utils/loaders/key/__init__.py,sha256=RfqIbUxkdlx1xrbzJZPD_JHiRFNFLRuQs8JoUPCGCv4,108
|
140
140
|
maleo_foundation/utils/loaders/key/rsa.py,sha256=UXcP0rr4QVacTsHLNQuU05wcow5CHWz-JW-zsVxlbPs,4121
|
141
|
-
maleo_foundation-0.3.
|
142
|
-
maleo_foundation-0.3.
|
143
|
-
maleo_foundation-0.3.
|
144
|
-
maleo_foundation-0.3.
|
141
|
+
maleo_foundation-0.3.71.dist-info/METADATA,sha256=GGQMQuHuJN0WqKiO594BEeNV7RjG39czMEPsrGNAHJo,4150
|
142
|
+
maleo_foundation-0.3.71.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
143
|
+
maleo_foundation-0.3.71.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
144
|
+
maleo_foundation-0.3.71.dist-info/RECORD,,
|
File without changes
|
File without changes
|