maleo-foundation 0.1.41__tar.gz → 0.1.43__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.
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/PKG-INFO +1 -1
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/service.py +3 -1
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/__init__.py +2 -0
- maleo_foundation-0.1.43/maleo_foundation/utils/mergers.py +23 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/PKG-INFO +1 -1
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/SOURCES.txt +1 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/pyproject.toml +1 -1
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/README.md +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/authentication.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/constants.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/enums.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/client.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/general.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/query.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/service.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/token.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/extended_types.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/base.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/base.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/secret.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/storage.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/maleo.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/db.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/middleware.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/authentication.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/base.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/cors.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/responses.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/general.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/parameter.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/result.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/token.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/table.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/general/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/general/token.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/client.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/general.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/service.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/token.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/service.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/general.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/query.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/token.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/services/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/services/token.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/types.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/controller.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/exceptions.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/extractor.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/formatter/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/formatter/case.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/__init__.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/json.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/key.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/yaml.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/logging.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/query.py +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/dependency_links.txt +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/requires.txt +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/top_level.txt +0 -0
- {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/setup.cfg +0 -0
@@ -24,6 +24,7 @@ from maleo_foundation.utils.loaders.json import JSONLoader
|
|
24
24
|
from maleo_foundation.utils.loaders.key import KeyLoader
|
25
25
|
from maleo_foundation.utils.loaders.yaml import YAMLLoader
|
26
26
|
from maleo_foundation.utils.logging import GoogleCloudLogging, ServiceLogger, MiddlewareLogger
|
27
|
+
from maleo_foundation.utils.mergers import BaseMergers
|
27
28
|
|
28
29
|
class LogConfig(BaseModel):
|
29
30
|
logs_dir:str = Field(..., description="Logs directory")
|
@@ -299,7 +300,8 @@ class ServiceManager:
|
|
299
300
|
self._static_configs = StaticConfigurations.model_validate(static_configurations)
|
300
301
|
runtime_configurations = YAMLLoader.load(self._settings.RUNTIME_CONFIGURATIONS_PATH)
|
301
302
|
self._runtime_configs = RuntimeConfigurations.model_validate(runtime_configurations)
|
302
|
-
|
303
|
+
merged_configs = BaseMergers.deep_merge(self._static_configs.model_dump(), self._runtime_configs.model_dump())
|
304
|
+
self._configs = Configurations.model_validate(merged_configs)
|
303
305
|
|
304
306
|
@property
|
305
307
|
def configs(self) -> Configurations:
|
@@ -3,6 +3,7 @@ from .formatter import BaseFormatter
|
|
3
3
|
from .exceptions import BaseExceptions
|
4
4
|
from .extractor import BaseExtractors
|
5
5
|
from .loaders import BaseLoaders
|
6
|
+
from .mergers import BaseMergers
|
6
7
|
from .controller import BaseControllerUtils
|
7
8
|
from .query import BaseQueryUtils
|
8
9
|
|
@@ -11,5 +12,6 @@ class BaseUtils:
|
|
11
12
|
Exceptions = BaseExceptions
|
12
13
|
Extractors = BaseExtractors
|
13
14
|
Loaders = BaseLoaders
|
15
|
+
Mergers = BaseMergers
|
14
16
|
Controller = BaseControllerUtils
|
15
17
|
Query = BaseQueryUtils
|
@@ -0,0 +1,23 @@
|
|
1
|
+
from collections.abc import Mapping
|
2
|
+
from typing import Dict
|
3
|
+
|
4
|
+
class BaseMergers:
|
5
|
+
@staticmethod
|
6
|
+
def deep_merge(*obj:Dict) -> Dict:
|
7
|
+
def merge_dicts(a:Dict, b:Dict) -> Dict:
|
8
|
+
result = dict(a)
|
9
|
+
for key, value in b.items():
|
10
|
+
if (
|
11
|
+
key in result
|
12
|
+
and isinstance(result[key], Mapping)
|
13
|
+
and isinstance(value, Mapping)
|
14
|
+
):
|
15
|
+
result[key] = merge_dicts(result[key], value)
|
16
|
+
else:
|
17
|
+
result[key] = value
|
18
|
+
return result
|
19
|
+
|
20
|
+
merged = {}
|
21
|
+
for ob in obj:
|
22
|
+
merged = merge_dicts(merged, ob)
|
23
|
+
return merged
|
@@ -66,6 +66,7 @@ maleo_foundation/utils/controller.py
|
|
66
66
|
maleo_foundation/utils/exceptions.py
|
67
67
|
maleo_foundation/utils/extractor.py
|
68
68
|
maleo_foundation/utils/logging.py
|
69
|
+
maleo_foundation/utils/mergers.py
|
69
70
|
maleo_foundation/utils/query.py
|
70
71
|
maleo_foundation/utils/formatter/__init__.py
|
71
72
|
maleo_foundation/utils/formatter/case.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/client.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/general.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/query.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/service.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/token.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/base.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/base.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/maleo.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/authentication.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/general.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/parameter.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/result.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/token.py
RENAMED
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/__init__.py
RENAMED
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
|
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
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/formatter/__init__.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/formatter/case.py
RENAMED
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|