maleo-foundation 0.1.91__tar.gz → 0.1.93__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 (118) hide show
  1. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/PKG-INFO +1 -1
  2. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/service.py +4 -2
  3. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/responses.py +3 -9
  4. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/result.py +24 -0
  5. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/client/service.py +2 -0
  6. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/service/general.py +2 -0
  7. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/service/query.py +2 -0
  8. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation.egg-info/PKG-INFO +1 -1
  9. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/pyproject.toml +1 -1
  10. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/README.md +0 -0
  11. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/__init__.py +0 -0
  12. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/authentication.py +0 -0
  13. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/__init__.py +0 -0
  14. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/manager.py +0 -0
  15. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/__init__.py +0 -0
  16. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/encryption/__init__.py +0 -0
  17. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/encryption/aes.py +0 -0
  18. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/encryption/rsa.py +0 -0
  19. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/hash/__init__.py +0 -0
  20. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/hash/bcrypt.py +0 -0
  21. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/hash/hmac.py +0 -0
  22. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/hash/sha256.py +0 -0
  23. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/key.py +0 -0
  24. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/signature.py +0 -0
  25. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/client/services/token.py +0 -0
  26. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/constants.py +0 -0
  27. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/enums.py +0 -0
  28. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/__init__.py +0 -0
  29. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/client.py +0 -0
  30. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/encryption/__init__.py +0 -0
  31. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/encryption/aes.py +0 -0
  32. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/encryption/rsa.py +0 -0
  33. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/general.py +0 -0
  34. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/hash.py +0 -0
  35. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/key.py +0 -0
  36. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/query.py +0 -0
  37. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/service.py +0 -0
  38. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/signature.py +0 -0
  39. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/expanded_types/token.py +0 -0
  40. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/extended_types.py +0 -0
  41. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/__init__.py +0 -0
  42. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/__init__.py +0 -0
  43. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/base.py +0 -0
  44. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/google/__init__.py +0 -0
  45. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/google/base.py +0 -0
  46. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/google/secret.py +0 -0
  47. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/google/storage.py +0 -0
  48. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/client/maleo.py +0 -0
  49. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/db.py +0 -0
  50. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/managers/middleware.py +0 -0
  51. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/middlewares/authentication.py +0 -0
  52. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/middlewares/base.py +0 -0
  53. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/middlewares/cors.py +0 -0
  54. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/__init__.py +0 -0
  55. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/__init__.py +0 -0
  56. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/encryption.py +0 -0
  57. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/general.py +0 -0
  58. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/hash.py +0 -0
  59. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/key.py +0 -0
  60. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/parameter.py +0 -0
  61. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/signature.py +0 -0
  62. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/schemas/token.py +0 -0
  63. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/table.py +0 -0
  64. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/__init__.py +0 -0
  65. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/general/__init__.py +0 -0
  66. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/general/key.py +0 -0
  67. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/general/signature.py +0 -0
  68. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/general/token.py +0 -0
  69. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
  70. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/client.py +0 -0
  71. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/encryption/__init__.py +0 -0
  72. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/encryption/aes.py +0 -0
  73. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/encryption/rsa.py +0 -0
  74. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/general.py +0 -0
  75. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/hash/__init__.py +0 -0
  76. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/hash/bcrypt.py +0 -0
  77. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/hash/hmac.py +0 -0
  78. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/hash/sha256.py +0 -0
  79. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/key.py +0 -0
  80. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/service.py +0 -0
  81. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/signature.py +0 -0
  82. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/parameters/token.py +0 -0
  83. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/__init__.py +0 -0
  84. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
  85. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
  86. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
  87. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/encryption/__init__.py +0 -0
  88. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/encryption/aes.py +0 -0
  89. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/encryption/rsa.py +0 -0
  90. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/hash.py +0 -0
  91. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/key.py +0 -0
  92. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
  93. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
  94. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
  95. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/signature.py +0 -0
  96. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/models/transfers/results/token.py +0 -0
  97. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/types.py +0 -0
  98. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/__init__.py +0 -0
  99. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/controller.py +0 -0
  100. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/exceptions.py +0 -0
  101. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/extractor.py +0 -0
  102. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/formatter/__init__.py +0 -0
  103. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/formatter/case.py +0 -0
  104. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/__init__.py +0 -0
  105. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/credential/__init__.py +0 -0
  106. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/credential/google.py +0 -0
  107. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/json.py +0 -0
  108. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/key/__init__.py +0 -0
  109. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/key/rsa.py +0 -0
  110. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/loaders/yaml.py +0 -0
  111. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/logging.py +0 -0
  112. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/mergers.py +0 -0
  113. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation/utils/query.py +0 -0
  114. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation.egg-info/SOURCES.txt +0 -0
  115. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation.egg-info/dependency_links.txt +0 -0
  116. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation.egg-info/requires.txt +0 -0
  117. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/maleo_foundation.egg-info/top_level.txt +0 -0
  118. {maleo_foundation-0.1.91 → maleo_foundation-0.1.93}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.91
3
+ Version: 0.1.93
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -180,15 +180,17 @@ class ServiceManager:
180
180
  static_configurations_path = Path(self._settings.STATIC_CONFIGURATIONS_PATH)
181
181
  if static_configurations_path.exists() and static_configurations_path.is_file():
182
182
  static_configurations = YAMLLoader.load(self._settings.STATIC_CONFIGURATIONS_PATH)
183
+ static_configs = StaticConfigurations.model_validate(static_configurations)
183
184
  else:
184
185
  static_configurations = self._secret_manager.get(f"maleo-static-config-{self._settings.ENVIRONMENT}")
185
- static_configs = StaticConfigurations.model_validate(static_configurations)
186
+ static_configs = StaticConfigurations.model_validate_strings(static_configurations)
186
187
  runtime_configurations_path = Path(self._settings.RUNTIME_CONFIGURATIONS_PATH)
187
188
  if runtime_configurations_path.exists() and runtime_configurations_path.is_file():
188
189
  runtime_configurations = YAMLLoader.load(self._settings.RUNTIME_CONFIGURATIONS_PATH)
190
+ runtime_configs = RuntimeConfigurations.model_validate(runtime_configurations)
189
191
  else:
190
192
  runtime_configurations = self._secret_manager.get(f"{self._settings.SERVICE_KEY}-runtime-config-{self._settings.ENVIRONMENT}")
191
- runtime_configs = RuntimeConfigurations.model_validate(runtime_configurations)
193
+ runtime_configs = RuntimeConfigurations.model_validate_strings(runtime_configurations)
192
194
  password = self._secret_manager.get(name=f"maleo-db-password-{self._settings.ENVIRONMENT}")
193
195
  host = self._secret_manager.get(name=f"maleo-db-host-{self._settings.ENVIRONMENT}")
194
196
  database = DatabaseConfigurations(password=password, host=host, database=runtime_configs.database)
@@ -30,11 +30,6 @@ class BaseResponses:
30
30
  message:str = "Forbidden Request"
31
31
  description:str = "You are forbidden from requesting this resource"
32
32
 
33
- class NotFound(Fail):
34
- code:str = "MAL-NTF-001"
35
- message:str = "Not Found Error"
36
- description:str = "The resource you requested can not be found. Ensure your request is correct."
37
-
38
33
  class ValidationError(Fail):
39
34
  code:str = "MAL-VLD-001"
40
35
  message:str = "Validation Error"
@@ -50,10 +45,9 @@ class BaseResponses:
50
45
  message:str = "Unexpected Server Error"
51
46
  description:str = "An unexpected error occurred while processing your request."
52
47
 
53
- class NoData(BaseResultSchemas.NoData):
54
- code:str = "MAL-NDT-001"
55
- message:str = "No data found"
56
- description:str = "No data found in the resource you requested."
48
+ class NotFound(BaseResultSchemas.NotFound): pass
49
+
50
+ class NoData(BaseResultSchemas.NoData): pass
57
51
 
58
52
  class SingleData(BaseResultSchemas.SingleData): pass
59
53
 
@@ -18,26 +18,50 @@ class BaseResultSchemas:
18
18
 
19
19
  #* ----- ----- ----- Intermediary ----- ----- ----- *#
20
20
  class Fail(Base):
21
+ code:str = "MAL-FAI-001"
22
+ message:str = "Fail result"
23
+ description:str = "Operation failed."
21
24
  success:BaseTypes.LiteralFalse = Field(False, description="Success status")
22
25
  data:None = Field(None, description="No data")
23
26
 
24
27
  class Success(Base):
25
28
  success:BaseTypes.LiteralTrue = Field(True, description="Success status")
29
+ code:str = "MAL-SCS-001"
30
+ message:str = "Success result"
31
+ description:str = "Operation succeeded."
26
32
  data:Any = Field(..., description="Data")
27
33
 
28
34
  #* ----- ----- ----- Derived ----- ----- ----- *#
35
+ class NotFound(Fail):
36
+ code:str = "MAL-NTF-001"
37
+ message:str = "Resource not found"
38
+ description:str = "The requested resource can not be found."
39
+ data:None = Field(None, description="No data")
40
+
29
41
  class NoData(Success):
42
+ code:str = "MAL-NDT-001"
43
+ message:str = "No data found"
44
+ description:str = "No data found in the requested resource."
30
45
  data:None = Field(None, description="No data")
31
46
 
32
47
  class SingleData(Success):
48
+ code:str = "MAL-SGD-001"
49
+ message:str = "Single data found"
50
+ description:str = "Requested data found in database."
33
51
  data:Any = Field(..., description="Fetched single data")
34
52
 
35
53
  class UnpaginatedMultipleData(Success):
54
+ code:str = "MAL-MTD-001"
55
+ message:str = "Multiple unpaginated data found"
56
+ description:str = "Requested unpaginated data found in database."
36
57
  data:BaseTypes.ListOfAny = Field(..., description="Unpaginated multiple data")
37
58
 
38
59
  class PaginatedMultipleData(
39
60
  UnpaginatedMultipleData,
40
61
  BaseGeneralSchemas.SimplePagination
41
62
  ):
63
+ code:str = "MAL-MTD-002"
64
+ message:str = "Multiple paginated data found"
65
+ description:str = "Requested paginated data found in database."
42
66
  total_data:int = Field(..., ge=0, description="Total data count")
43
67
  pagination:BaseGeneralSchemas.ExtendedPagination = Field(..., description="Pagination metadata")
@@ -6,6 +6,8 @@ from maleo_foundation.models.schemas.result import BaseResultSchemas
6
6
  class BaseClientServiceResultsTransfers:
7
7
  class Fail(BaseResultSchemas.Fail): pass
8
8
 
9
+ class NotFound(BaseResultSchemas.NotFound): pass
10
+
9
11
  class NoData(BaseResultSchemas.NoData): pass
10
12
 
11
13
  class SingleData(BaseResultSchemas.SingleData): pass
@@ -6,6 +6,8 @@ from maleo_foundation.models.schemas.result import BaseResultSchemas
6
6
  class BaseServiceGeneralResultsTransfers:
7
7
  class Fail(BaseResultSchemas.Fail): pass
8
8
 
9
+ class NotFound(BaseResultSchemas.NotFound): pass
10
+
9
11
  class NoData(BaseResultSchemas.NoData): pass
10
12
 
11
13
  class SingleData(BaseResultSchemas.SingleData): pass
@@ -13,6 +13,8 @@ class BaseServiceQueryResultsTransfers:
13
13
 
14
14
  class Fail(BaseResultSchemas.Fail): pass
15
15
 
16
+ class NotFound(BaseResultSchemas.NotFound): pass
17
+
16
18
  class NoData(BaseResultSchemas.NoData): pass
17
19
 
18
20
  class SingleData(BaseResultSchemas.SingleData):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.91
3
+ Version: 0.1.93
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maleo_foundation"
7
- version = "0.1.91"
7
+ version = "0.1.93"
8
8
  description = "Foundation package for Maleo"
9
9
  authors = [
10
10
  { name = "Agra Bima Yuda", email = "agra@nexmedis.com" }