maleo-foundation 0.0.87__tar.gz → 0.0.89__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 (89) hide show
  1. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/PKG-INFO +1 -1
  2. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/service.py +16 -1
  3. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/services/token.py +14 -14
  4. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation.egg-info/PKG-INFO +1 -1
  5. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/pyproject.toml +1 -1
  6. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/README.md +0 -0
  7. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/__init__.py +0 -0
  8. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/__init__.py +0 -0
  9. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/general/__init__.py +0 -0
  10. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/general/http.py +0 -0
  11. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/__init__.py +0 -0
  12. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/base.py +0 -0
  13. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/cloud/__init__.py +0 -0
  14. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/cloud/base.py +0 -0
  15. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/cloud/logging.py +0 -0
  16. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/cloud/secret.py +0 -0
  17. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/cloud/storage.py +0 -0
  18. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/secret.py +0 -0
  19. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/google/storage.py +0 -0
  20. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/utils/__init__.py +0 -0
  21. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/clients/utils/logger.py +0 -0
  22. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/constants.py +0 -0
  23. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/db/__init__.py +0 -0
  24. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/db/engine.py +0 -0
  25. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/db/manager.py +0 -0
  26. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/db/session.py +0 -0
  27. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/db/table.py +0 -0
  28. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/enums.py +0 -0
  29. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/expanded_types/__init__.py +0 -0
  30. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/expanded_types/client.py +0 -0
  31. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/expanded_types/general.py +0 -0
  32. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/expanded_types/query.py +0 -0
  33. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/expanded_types/service.py +0 -0
  34. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/expanded_types/token.py +0 -0
  35. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/extended_types.py +0 -0
  36. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/__init__.py +0 -0
  37. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/__init__.py +0 -0
  38. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/base.py +0 -0
  39. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/google/__init__.py +0 -0
  40. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/google/base.py +0 -0
  41. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/google/secret.py +0 -0
  42. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/google/storage.py +0 -0
  43. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/client/http.py +0 -0
  44. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/managers/db.py +0 -0
  45. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/middlewares/__init__.py +0 -0
  46. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/middlewares/base.py +0 -0
  47. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/middlewares/cors.py +0 -0
  48. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/__init__.py +0 -0
  49. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/responses.py +0 -0
  50. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/schemas/__init__.py +0 -0
  51. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/schemas/general.py +0 -0
  52. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/schemas/parameter.py +0 -0
  53. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/schemas/result.py +0 -0
  54. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/schemas/token.py +0 -0
  55. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/__init__.py +0 -0
  56. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/general/__init__.py +0 -0
  57. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/general/token.py +0 -0
  58. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/parameters/__init__.py +0 -0
  59. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/parameters/client.py +0 -0
  60. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/parameters/general.py +0 -0
  61. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/parameters/service.py +0 -0
  62. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/parameters/token.py +0 -0
  63. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/__init__.py +0 -0
  64. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/client/__init__.py +0 -0
  65. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/client/controllers/__init__.py +0 -0
  66. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/client/controllers/http.py +0 -0
  67. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/client/service.py +0 -0
  68. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/service/__init__.py +0 -0
  69. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/service/controllers/__init__.py +0 -0
  70. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/service/controllers/rest.py +0 -0
  71. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/service/general.py +0 -0
  72. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/service/query.py +0 -0
  73. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/models/transfers/results/token.py +0 -0
  74. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/services/__init__.py +0 -0
  75. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/types.py +0 -0
  76. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/__init__.py +0 -0
  77. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/controller.py +0 -0
  78. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/exceptions.py +0 -0
  79. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/formatter/__init__.py +0 -0
  80. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/formatter/case.py +0 -0
  81. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/keyloader.py +0 -0
  82. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/logger.py +0 -0
  83. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/logging.py +0 -0
  84. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation/utils/query.py +0 -0
  85. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation.egg-info/SOURCES.txt +0 -0
  86. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation.egg-info/dependency_links.txt +0 -0
  87. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation.egg-info/requires.txt +0 -0
  88. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/maleo_foundation.egg-info/top_level.txt +0 -0
  89. {maleo_foundation-0.0.87 → maleo_foundation-0.0.89}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.0.87
3
+ Version: 0.0.89
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -23,7 +23,7 @@ class Settings(BaseSettings):
23
23
  PRIVATE_KEY_PATH:str = Field("/keys/maleo-private-key.pem", description="Maleo's private key path")
24
24
  PUBLIC_KEY_PATH:str = Field("/keys/maleo-public-key.pem", description="Maleo's public key path")
25
25
  KEY_PASSWORD:str = Field(..., description="Maleo key's password")
26
- CONFIGURATIONS_PATH:str = Field("...", description="Service's configuration file path")
26
+ CONFIGURATIONS_PATH:str = Field(..., description="Service's configuration file path")
27
27
 
28
28
  class Keys(BaseModel):
29
29
  password:str = Field(..., description="Key's password")
@@ -53,6 +53,9 @@ class Credentials(BaseModel):
53
53
  google:GoogleCredentials = Field(..., description="Google's credentials")
54
54
  internal:InternalCredentials = Field(..., description="Internal's credentials")
55
55
 
56
+ class Config:
57
+ arbitrary_types_allowed=True
58
+
56
59
  class ServiceConfigurations(BaseModel):
57
60
  key:str = Field(..., description="Service's key")
58
61
  name:str = Field(..., description="Service's name")
@@ -77,19 +80,31 @@ class Configurations(BaseModel):
77
80
  middleware:MiddlewareConfigurations = Field(..., description="Middleware's configurations")
78
81
  database:DatabaseConfigurations = Field(..., description="Database's configurations")
79
82
 
83
+ class Config:
84
+ arbitrary_types_allowed=True
85
+
80
86
  class Loggers(BaseModel):
81
87
  application:ServiceLogger = Field(..., description="Application logger")
82
88
  database:ServiceLogger = Field(..., description="Database logger")
83
89
  middleware:ServiceLogger = Field(..., description="Middleware logger")
84
90
 
91
+ class Config:
92
+ arbitrary_types_allowed=True
93
+
85
94
  class GoogleClientManagers(BaseModel):
86
95
  secret:GoogleSecretManager = Field(..., description="Google secret manager client manager")
87
96
  storage:GoogleCloudStorage = Field(..., description="Google cloud storage client manager")
88
97
 
98
+ class Config:
99
+ arbitrary_types_allowed=True
100
+
89
101
  class ClientManagers(BaseModel):
90
102
  google:GoogleClientManagers = Field(..., description="Google client's managers")
91
103
  http:HTTPClientManager = Field(..., description="HTTP client's manager")
92
104
 
105
+ class Config:
106
+ arbitrary_types_allowed=True
107
+
93
108
  class ServiceManager:
94
109
  def __init__(
95
110
  self,
@@ -1,8 +1,8 @@
1
1
  import jwt
2
2
  from cryptography.hazmat.primitives import serialization
3
3
  from cryptography.hazmat.backends import default_backend
4
- from maleo_foundation.clients.utils.logger import MaleoFoundationLoggerManager
5
- from maleo_foundation.utils.exceptions import BaseExceptions
4
+ # from maleo_foundation.clients.utils.logger import MaleoFoundationLoggerManager
5
+ # from maleo_foundation.utils.exceptions import BaseExceptions
6
6
  from maleo_foundation.models.transfers.general.token import BaseTokenGeneralTransfers
7
7
  from maleo_foundation.models.schemas.token import BaseTokenSchemas
8
8
  from maleo_foundation.models.transfers.parameters.token import BaseTokenParametersTransfers
@@ -11,11 +11,11 @@ from maleo_foundation.expanded_types.token import BaseTokenResultsTypes
11
11
 
12
12
  class BaseTokenService:
13
13
  @staticmethod
14
- @BaseExceptions.service_exception_handler(
15
- operation="encoding a payload",
16
- logger_factory=MaleoFoundationLoggerManager.get,
17
- fail_result_class=BaseTokenResultsTransfers.Fail
18
- )
14
+ # @BaseExceptions.service_exception_handler(
15
+ # operation="encoding a payload",
16
+ # logger_factory=MaleoFoundationLoggerManager.get,
17
+ # fail_result_class=BaseTokenResultsTransfers.Fail
18
+ # )
19
19
  def encode(parameters:BaseTokenParametersTransfers.Encode) -> BaseTokenResultsTypes.Encode:
20
20
  #* Serialize private key
21
21
  private_key_bytes = parameters.key.encode()
@@ -27,17 +27,17 @@ class BaseTokenService:
27
27
  payload = BaseTokenGeneralTransfers.EncodePayload.model_validate(parameters.payload.model_dump()).model_dump(mode="json")
28
28
  token = jwt.encode(payload=payload, key=private_key, algorithm="RS256")
29
29
  data = BaseTokenSchemas.Token(token=token)
30
- MaleoFoundationLoggerManager.get().info("Payload successfully encoded")
30
+ # MaleoFoundationLoggerManager.get().info("Payload successfully encoded")
31
31
  return BaseTokenResultsTransfers.Encode(data=data)
32
32
 
33
33
  @staticmethod
34
- @BaseExceptions.service_exception_handler(
35
- operation="decoding a token",
36
- logger_factory=MaleoFoundationLoggerManager.get,
37
- fail_result_class=BaseTokenResultsTransfers.Fail
38
- )
34
+ # @BaseExceptions.service_exception_handler(
35
+ # operation="decoding a token",
36
+ # logger_factory=MaleoFoundationLoggerManager.get,
37
+ # fail_result_class=BaseTokenResultsTransfers.Fail
38
+ # )
39
39
  def decode(parameters:BaseTokenParametersTransfers.Decode) -> BaseTokenResultsTypes.Decode:
40
40
  payload = jwt.decode(jwt=parameters.token, key=parameters.key, algorithms=["RS256"])
41
41
  data = BaseTokenGeneralTransfers.DecodePayload.model_validate(payload)
42
- MaleoFoundationLoggerManager.get().info("Token successfully decoded")
42
+ # MaleoFoundationLoggerManager.get().info("Token successfully decoded")
43
43
  return BaseTokenResultsTransfers.Decode(data=data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.0.87
3
+ Version: 0.0.89
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.0.87"
7
+ version = "0.0.89"
8
8
  description = "Foundation package for Maleo"
9
9
  authors = [
10
10
  { name = "Agra Bima Yuda", email = "agra@nexmedis.com" }