maleo-foundation 0.1.11__py3-none-any.whl → 0.1.13__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.
@@ -14,9 +14,9 @@ class URL(BaseModel):
14
14
  return f"{self.base}/api"
15
15
 
16
16
  class ClientHTTPControllerManager:
17
- def __init__(self, base_url:str) -> None:
17
+ def __init__(self, url:str) -> None:
18
18
  self._client = httpx.AsyncClient()
19
- self._url = URL(base=base_url)
19
+ self._url = URL(base=url)
20
20
 
21
21
  async def _client_handler(self) -> AsyncGenerator[httpx.AsyncClient, None]:
22
22
  """Reusable generator for client handling."""
@@ -85,13 +85,13 @@ class ClientServices(BaseModel):
85
85
  arbitrary_types_allowed=True
86
86
 
87
87
  class MaleoClientManager(ClientManager):
88
- def __init__(self, key, name, logs_dir, google_cloud_logging = None, base_url:BaseTypes.OptionalString = None):
88
+ def __init__(self, key, name, logs_dir, google_cloud_logging = None, url:BaseTypes.OptionalString = None):
89
89
  super().__init__(key, name, logs_dir, google_cloud_logging)
90
- self._base_url = base_url
90
+ self._url = url
91
91
 
92
92
  def _initialize_controllers(self) -> None:
93
93
  #* Initialize managers
94
- http_controller_manager = ClientHTTPControllerManager(base_url=self._base_url)
94
+ http_controller_manager = ClientHTTPControllerManager(url=self._url)
95
95
  self._controller_managers = ClientControllerManagers(http=http_controller_manager)
96
96
  #* Initialize controllers
97
97
  #! This initialied an empty controllers. Extend this function in the actual class to initialize all controllers.
@@ -322,7 +322,9 @@ class ServiceManager:
322
322
  #* Initialize maleo clients
323
323
  self._maleo_clients = MaleoClientManagers()
324
324
  if self._maleo_client_manager_classes.metadata is not None and issubclass(self._maleo_client_manager_classes.metadata, MaleoClientManager):
325
+ self._loggers.application.info("Initializing %s client manager", self._configs.client.maleo.metadata.key)
325
326
  self._maleo_clients.metadata = self._maleo_client_manager_classes.metadata(**self._configs.client.maleo.metadata.model_dump(), **self._log_config.model_dump())
327
+ self._loggers.application.info("%s client manager initialized successfully", self._configs.client.maleo.metadata.key)
326
328
  self._clients = ClientManagers(google=self._google_clients, http=self._http_client, maleo=self._maleo_clients)
327
329
 
328
330
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -30,11 +30,11 @@ maleo_foundation/expanded_types/service.py,sha256=q8jpKdbCbLWwH1UPQavKpVE14rC5rv
30
30
  maleo_foundation/expanded_types/token.py,sha256=4fRTJw6W5MYq71NksNrWNi7qYHQ4_lQwfu9WxwrMipc,355
31
31
  maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  maleo_foundation/managers/db.py,sha256=rbB5W2rSxV2xcexh9j79U4ZKgAuA61t8ZD2IKppg22k,4867
33
- maleo_foundation/managers/service.py,sha256=I-Sh3dP6UyBG4xXqAZE8BrOhO41nNjZAbVubuw8GPN8,17585
33
+ maleo_foundation/managers/service.py,sha256=va8wiU3oImQRo839CxXx2PWJRitsnx-mFPMh1ZGgW88,17833
34
34
  maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  maleo_foundation/managers/client/base.py,sha256=GytrN4WB0oa8Flg6VHJ4oSg7kaWQBjXQ8GTwC4VFleY,965
36
36
  maleo_foundation/managers/client/http.py,sha256=dWFZlG1z4TERYBITReR5oSrlzvdhh2EtztVnsU8gCeA,2712
37
- maleo_foundation/managers/client/maleo.py,sha256=1ADR8qXKmmaCwBY0OXzK_qvZK6ZnBs28QZIfAIHBYLo,3699
37
+ maleo_foundation/managers/client/maleo.py,sha256=2EslsYZyCcCAQyR6j9u2791vfHo1tizhtre2l9zR9vs,3664
38
38
  maleo_foundation/managers/client/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  maleo_foundation/managers/client/google/base.py,sha256=1lrGoyGnYW5Xq05bVXbKqnsqqmFPnsqZCBPK5-DINDA,1037
40
40
  maleo_foundation/managers/client/google/secret.py,sha256=iKXaF8qNDXRYbmosS9bAXQFYwRdDZ3Kh2yKhBAaOoEI,3061
@@ -79,7 +79,7 @@ maleo_foundation/utils/logging.py,sha256=DuAaKQ1X7lB0y6udR-GF95BRKeluh0JoYN0K_jc
79
79
  maleo_foundation/utils/query.py,sha256=ODQ3adOYQNj5E2cRW9ytbjBz56nEDcnfq8mQ6YZbCCM,4375
80
80
  maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
81
81
  maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
82
- maleo_foundation-0.1.11.dist-info/METADATA,sha256=RSY-uQqC5Vzn1FnWFpgVzm3RMmJ58Q6iv2YN2uS9h9w,3190
83
- maleo_foundation-0.1.11.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
84
- maleo_foundation-0.1.11.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
85
- maleo_foundation-0.1.11.dist-info/RECORD,,
82
+ maleo_foundation-0.1.13.dist-info/METADATA,sha256=TegQXAtiKuENhdC46UsHV2wrmqvYJ0uquGEKyj7IPso,3190
83
+ maleo_foundation-0.1.13.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
84
+ maleo_foundation-0.1.13.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
85
+ maleo_foundation-0.1.13.dist-info/RECORD,,