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.
Files changed (78) hide show
  1. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/PKG-INFO +1 -1
  2. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/service.py +3 -1
  3. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/__init__.py +2 -0
  4. maleo_foundation-0.1.43/maleo_foundation/utils/mergers.py +23 -0
  5. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/PKG-INFO +1 -1
  6. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/SOURCES.txt +1 -0
  7. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/pyproject.toml +1 -1
  8. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/README.md +0 -0
  9. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/__init__.py +0 -0
  10. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/authentication.py +0 -0
  11. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/constants.py +0 -0
  12. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/enums.py +0 -0
  13. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/__init__.py +0 -0
  14. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/client.py +0 -0
  15. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/general.py +0 -0
  16. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/query.py +0 -0
  17. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/service.py +0 -0
  18. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/expanded_types/token.py +0 -0
  19. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/extended_types.py +0 -0
  20. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/__init__.py +0 -0
  21. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/__init__.py +0 -0
  22. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/base.py +0 -0
  23. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/__init__.py +0 -0
  24. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/base.py +0 -0
  25. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/secret.py +0 -0
  26. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/google/storage.py +0 -0
  27. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/client/maleo.py +0 -0
  28. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/db.py +0 -0
  29. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/managers/middleware.py +0 -0
  30. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/__init__.py +0 -0
  31. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/authentication.py +0 -0
  32. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/base.py +0 -0
  33. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/middlewares/cors.py +0 -0
  34. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/__init__.py +0 -0
  35. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/responses.py +0 -0
  36. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/__init__.py +0 -0
  37. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/general.py +0 -0
  38. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/parameter.py +0 -0
  39. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/result.py +0 -0
  40. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/schemas/token.py +0 -0
  41. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/table.py +0 -0
  42. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/__init__.py +0 -0
  43. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/general/__init__.py +0 -0
  44. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/general/token.py +0 -0
  45. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
  46. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/client.py +0 -0
  47. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/general.py +0 -0
  48. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/service.py +0 -0
  49. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/parameters/token.py +0 -0
  50. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/__init__.py +0 -0
  51. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
  52. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
  53. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
  54. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/client/service.py +0 -0
  55. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
  56. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
  57. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
  58. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/general.py +0 -0
  59. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/service/query.py +0 -0
  60. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/models/transfers/results/token.py +0 -0
  61. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/services/__init__.py +0 -0
  62. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/services/token.py +0 -0
  63. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/types.py +0 -0
  64. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/controller.py +0 -0
  65. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/exceptions.py +0 -0
  66. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/extractor.py +0 -0
  67. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/formatter/__init__.py +0 -0
  68. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/formatter/case.py +0 -0
  69. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/__init__.py +0 -0
  70. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/json.py +0 -0
  71. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/key.py +0 -0
  72. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/loaders/yaml.py +0 -0
  73. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/logging.py +0 -0
  74. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation/utils/query.py +0 -0
  75. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/dependency_links.txt +0 -0
  76. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/requires.txt +0 -0
  77. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/maleo_foundation.egg-info/top_level.txt +0 -0
  78. {maleo_foundation-0.1.41 → maleo_foundation-0.1.43}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.41
3
+ Version: 0.1.43
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -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
- self._configs = Configurations.model_validate(self._static_configs.model_dump() | self._runtime_configs)
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.41
3
+ Version: 0.1.43
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maleo_foundation"
7
- version = "0.1.41"
7
+ version = "0.1.43"
8
8
  description = "Foundation package for Maleo"
9
9
  authors = [
10
10
  { name = "Agra Bima Yuda", email = "agra@nexmedis.com" }