maleo-foundation 0.0.100__py3-none-any.whl → 0.1.2__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.
- maleo_foundation/clients/utils/logger.py +49 -49
- maleo_foundation/managers/client/base.py +1 -1
- maleo_foundation/managers/client/http.py +43 -1
- maleo_foundation/managers/client/maleo.py +112 -0
- maleo_foundation/managers/service.py +37 -4
- maleo_foundation/services/token.py +0 -14
- maleo_foundation/utils/logging.py +24 -1
- {maleo_foundation-0.0.100.dist-info → maleo_foundation-0.1.2.dist-info}/METADATA +1 -1
- {maleo_foundation-0.0.100.dist-info → maleo_foundation-0.1.2.dist-info}/RECORD +11 -10
- {maleo_foundation-0.0.100.dist-info → maleo_foundation-0.1.2.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.0.100.dist-info → maleo_foundation-0.1.2.dist-info}/top_level.txt +0 -0
@@ -1,54 +1,54 @@
|
|
1
|
-
from typing import Dict
|
2
|
-
from maleo_foundation.enums import BaseEnums
|
3
|
-
from maleo_foundation.types import BaseTypes
|
4
|
-
from maleo_foundation.utils.logger import BaseLogger
|
1
|
+
# from typing import Dict
|
2
|
+
# from maleo_foundation.enums import BaseEnums
|
3
|
+
# from maleo_foundation.types import BaseTypes
|
4
|
+
# from maleo_foundation.utils.logger import BaseLogger
|
5
5
|
|
6
|
-
class ClientLoggerManager:
|
7
|
-
|
6
|
+
# class ClientLoggerManager:
|
7
|
+
# _loggers:Dict[type, BaseLogger] = {}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
9
|
+
# @classmethod
|
10
|
+
# def initialize(
|
11
|
+
# cls,
|
12
|
+
# base_dir:str,
|
13
|
+
# client_name:str,
|
14
|
+
# service_name:BaseTypes.OptionalString = None,
|
15
|
+
# level:BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO
|
16
|
+
# ) -> BaseLogger:
|
17
|
+
# """Initialize client logger if not already initialized."""
|
18
|
+
# if cls not in cls._loggers:
|
19
|
+
# cls._loggers[cls] = BaseLogger(
|
20
|
+
# base_dir=base_dir,
|
21
|
+
# type=BaseEnums.LoggerType.CLIENT,
|
22
|
+
# service_name=service_name,
|
23
|
+
# client_name=client_name,
|
24
|
+
# level=level
|
25
|
+
# )
|
26
|
+
# return cls._loggers[cls]
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
# @classmethod
|
29
|
+
# def get(cls) -> BaseLogger:
|
30
|
+
# """Return client logger (if exist) or raise Runtime Error"""
|
31
|
+
# if cls not in cls._loggers:
|
32
|
+
# raise RuntimeError("Logger has not been initialized. Call 'initialize' first.")
|
33
|
+
# return cls._loggers[cls]
|
34
34
|
|
35
|
-
class MaleoFoundationLoggerManager(ClientLoggerManager):
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
35
|
+
# class MaleoFoundationLoggerManager(ClientLoggerManager):
|
36
|
+
# @classmethod
|
37
|
+
# def initialize(
|
38
|
+
# cls,
|
39
|
+
# base_dir:str,
|
40
|
+
# service_name:BaseTypes.OptionalString = None,
|
41
|
+
# level:BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO
|
42
|
+
# ) -> BaseLogger:
|
43
|
+
# """Initialize MaleoFoundation's client logger if not already initialized."""
|
44
|
+
# return super().initialize(
|
45
|
+
# base_dir=base_dir,
|
46
|
+
# client_name="MaleoFoundation",
|
47
|
+
# service_name=service_name,
|
48
|
+
# level=level
|
49
|
+
# )
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
# @classmethod
|
52
|
+
# def get(cls) -> BaseLogger:
|
53
|
+
# """Return client logger (if exist) or raise Runtime Error"""
|
54
|
+
# return super().get()
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import httpx
|
2
2
|
from contextlib import asynccontextmanager
|
3
|
+
from pydantic import BaseModel, Field
|
3
4
|
from typing import AsyncGenerator, Optional
|
5
|
+
from maleo_foundation.managers.client.base import ClientManager
|
4
6
|
|
5
7
|
class HTTPClientManager:
|
6
8
|
_client:Optional[httpx.AsyncClient] = None
|
@@ -32,9 +34,49 @@ class HTTPClientManager:
|
|
32
34
|
async for client in cls._client_handler():
|
33
35
|
yield client
|
34
36
|
|
37
|
+
@classmethod
|
38
|
+
def get_base_url(cls) -> str:
|
39
|
+
raise NotImplementedError()
|
40
|
+
|
35
41
|
@classmethod
|
36
42
|
async def dispose(cls) -> None:
|
37
43
|
"""Dispose of the HTTP client and release any resources."""
|
38
44
|
if cls._client is not None:
|
39
45
|
await cls._client.aclose()
|
40
|
-
cls._client = None
|
46
|
+
cls._client = None
|
47
|
+
|
48
|
+
class URL(BaseModel):
|
49
|
+
base:str = Field(..., "Base URL")
|
50
|
+
|
51
|
+
@property
|
52
|
+
def api(self) -> str:
|
53
|
+
return f"{self.base}/api"
|
54
|
+
|
55
|
+
class HTTPClientManagerV2(ClientManager):
|
56
|
+
def __init__(self, key, name, logs_dir, google_cloud_logging = None):
|
57
|
+
super().__init__(key, name, logs_dir, google_cloud_logging)
|
58
|
+
self._client = httpx.AsyncClient()
|
59
|
+
|
60
|
+
async def _client_handler(self) -> AsyncGenerator[httpx.AsyncClient, None]:
|
61
|
+
"""Reusable generator for client handling."""
|
62
|
+
yield self._client
|
63
|
+
|
64
|
+
async def inject_client(self) -> AsyncGenerator[httpx.AsyncClient, None]:
|
65
|
+
return self._client_handler()
|
66
|
+
|
67
|
+
@asynccontextmanager
|
68
|
+
async def get_client(self) -> AsyncGenerator[httpx.AsyncClient, None]:
|
69
|
+
"""
|
70
|
+
Async context manager for manual HTTP client handling.
|
71
|
+
Supports `async with HTTPClientManager.get() as client:`
|
72
|
+
"""
|
73
|
+
async for client in self._client_handler():
|
74
|
+
yield client
|
75
|
+
|
76
|
+
@property
|
77
|
+
def client(self) -> httpx.AsyncClient:
|
78
|
+
return self._client
|
79
|
+
|
80
|
+
@property
|
81
|
+
def url(self) -> URL:
|
82
|
+
raise NotImplementedError()
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import httpx
|
2
|
+
from contextlib import asynccontextmanager
|
3
|
+
from pydantic import BaseModel, Field
|
4
|
+
from typing import AsyncGenerator
|
5
|
+
from maleo_foundation.types import BaseTypes
|
6
|
+
from maleo_foundation.utils.logging import ClientLogger
|
7
|
+
from maleo_foundation.managers.client.base import ClientManager
|
8
|
+
|
9
|
+
class URL(BaseModel):
|
10
|
+
base:str = Field(..., "Base URL")
|
11
|
+
|
12
|
+
@property
|
13
|
+
def api(self) -> str:
|
14
|
+
return f"{self.base}/api"
|
15
|
+
|
16
|
+
class HTTPClientControllerManager:
|
17
|
+
def __init__(self, base_url:str) -> None:
|
18
|
+
self._client = httpx.AsyncClient()
|
19
|
+
self._url = URL(base=base_url)
|
20
|
+
|
21
|
+
async def _client_handler(self) -> AsyncGenerator[httpx.AsyncClient, None]:
|
22
|
+
"""Reusable generator for client handling."""
|
23
|
+
yield self._client
|
24
|
+
|
25
|
+
async def inject_client(self) -> AsyncGenerator[httpx.AsyncClient, None]:
|
26
|
+
return self._client_handler()
|
27
|
+
|
28
|
+
@asynccontextmanager
|
29
|
+
async def get_client(self) -> AsyncGenerator[httpx.AsyncClient, None]:
|
30
|
+
"""
|
31
|
+
Async context manager for manual HTTP client handling.
|
32
|
+
Supports `async with HTTPClientManager.get() as client:`
|
33
|
+
"""
|
34
|
+
async for client in self._client_handler():
|
35
|
+
yield client
|
36
|
+
|
37
|
+
@property
|
38
|
+
def client(self) -> httpx.AsyncClient:
|
39
|
+
return self._client
|
40
|
+
|
41
|
+
@property
|
42
|
+
def url(self) -> URL:
|
43
|
+
return self._url
|
44
|
+
|
45
|
+
class ClientControllerManagers(BaseModel):
|
46
|
+
http:HTTPClientControllerManager = Field(..., description="HTTP Client Controller")
|
47
|
+
|
48
|
+
class Config:
|
49
|
+
arbitrary_types_allowed=True
|
50
|
+
|
51
|
+
class HTTPClientController:
|
52
|
+
def __init__(self, manager:HTTPClientControllerManager):
|
53
|
+
self._manager = manager
|
54
|
+
|
55
|
+
@property
|
56
|
+
def manager(self) -> HTTPClientControllerManager:
|
57
|
+
return self._manager
|
58
|
+
|
59
|
+
class ClientServiceControllers(BaseModel):
|
60
|
+
http:HTTPClientController = Field(..., description="HTTP Client Controller")
|
61
|
+
|
62
|
+
class Config:
|
63
|
+
arbitrary_types_allowed=True
|
64
|
+
|
65
|
+
class ClientControllers(BaseModel):
|
66
|
+
#* Reuse this class while also adding all controllers of the client
|
67
|
+
class Config:
|
68
|
+
arbitrary_types_allowed=True
|
69
|
+
|
70
|
+
class ClientService:
|
71
|
+
def __init__(self, controllers:ClientServiceControllers, logger:ClientLogger):
|
72
|
+
self._controllers = controllers
|
73
|
+
self._logger = logger
|
74
|
+
|
75
|
+
@property
|
76
|
+
def controllers(self) -> ClientServiceControllers:
|
77
|
+
return self._controllers
|
78
|
+
|
79
|
+
@property
|
80
|
+
def logger(self) -> ClientLogger:
|
81
|
+
return self._logger
|
82
|
+
|
83
|
+
class ClientServices(BaseModel):
|
84
|
+
#* Reuse this class while also adding all the services of the client
|
85
|
+
class Config:
|
86
|
+
arbitrary_types_allowed=True
|
87
|
+
|
88
|
+
class MaleoClientManager(ClientManager):
|
89
|
+
def __init__(self, key, name, logs_dir, google_cloud_logging = None, base_url:BaseTypes.OptionalString = None):
|
90
|
+
super().__init__(key, name, logs_dir, google_cloud_logging)
|
91
|
+
self._base_url = base_url
|
92
|
+
|
93
|
+
def _initialize_controllers(self) -> None:
|
94
|
+
#* Initialize managers
|
95
|
+
http_controller_manager = HTTPClientControllerManager(base_url=self._base_url)
|
96
|
+
self._controller_managers = ClientControllerManagers(http=http_controller_manager)
|
97
|
+
#* Initialize controllers
|
98
|
+
#! This initialied an empty controllers. Extend this function in the actual class to initialize all controllers.
|
99
|
+
self._controllers = ClientControllers()
|
100
|
+
|
101
|
+
@property
|
102
|
+
def controllers(self) -> ClientControllers:
|
103
|
+
raise self._controllers
|
104
|
+
|
105
|
+
def _initialize_services(self) -> None:
|
106
|
+
#* Initialize services
|
107
|
+
#! This initialied an empty services. Extend this function in the actual class to initialize all services.
|
108
|
+
self._services = ClientServices()
|
109
|
+
|
110
|
+
@property
|
111
|
+
def services(self) -> ClientServices:
|
112
|
+
return self._services
|
@@ -11,11 +11,12 @@ from maleo_foundation.models.transfers.parameters.token import BaseTokenParamete
|
|
11
11
|
from maleo_foundation.managers.client.google.secret import GoogleSecretManager
|
12
12
|
from maleo_foundation.managers.client.google.storage import GoogleCloudStorage
|
13
13
|
from maleo_foundation.managers.client.http import HTTPClientManager
|
14
|
+
from maleo_foundation.managers.client.maleo import MaleoClientManager
|
14
15
|
from maleo_foundation.managers.db import DatabaseManager
|
15
16
|
from maleo_foundation.services.token import BaseTokenService
|
16
17
|
from maleo_foundation.types import BaseTypes
|
17
18
|
from maleo_foundation.utils.keyloader import load_key
|
18
|
-
from maleo_foundation.utils.logging import GoogleCloudLogging, ServiceLogger
|
19
|
+
from maleo_foundation.utils.logging import GoogleCloudLogging, ServiceLogger, ClientLoggerManager
|
19
20
|
|
20
21
|
class Settings(BaseSettings):
|
21
22
|
GOOGLE_CREDENTIALS_PATH:str = Field("/creds/maleo-google-service-account.json", description="Internal credential's file path")
|
@@ -84,10 +85,13 @@ class Configurations(BaseModel):
|
|
84
85
|
class Config:
|
85
86
|
arbitrary_types_allowed=True
|
86
87
|
|
88
|
+
ClientLoggerManagers = Dict[str, ClientLoggerManager]
|
89
|
+
|
87
90
|
class Loggers(BaseModel):
|
88
91
|
application:ServiceLogger = Field(..., description="Application logger")
|
89
92
|
database:ServiceLogger = Field(..., description="Database logger")
|
90
93
|
middleware:ServiceLogger = Field(..., description="Middleware logger")
|
94
|
+
client:ClientLoggerManagers = Field(default_factory=dict, description="Client logger manager")
|
91
95
|
|
92
96
|
class Config:
|
93
97
|
arbitrary_types_allowed=True
|
@@ -99,9 +103,24 @@ class GoogleClientManagers(BaseModel):
|
|
99
103
|
class Config:
|
100
104
|
arbitrary_types_allowed=True
|
101
105
|
|
106
|
+
class MaleoClientManagers(BaseModel):
|
107
|
+
metadata:Optional[MaleoClientManager] = Field(None, description="MaleoMetadata client manager")
|
108
|
+
security:Optional[MaleoClientManager] = Field(None, description="MaleoSecurity client manager")
|
109
|
+
storage:Optional[MaleoClientManager] = Field(None, description="MaleoStorage client manager")
|
110
|
+
identity:Optional[MaleoClientManager] = Field(None, description="MaleoIdentity client manager")
|
111
|
+
access:Optional[MaleoClientManager] = Field(None, description="MaleoAccess client manager")
|
112
|
+
soapie:Optional[MaleoClientManager] = Field(None, description="MaleoSOAPIE client manager")
|
113
|
+
fhir:Optional[MaleoClientManager] = Field(None, description="MaleoFHIR client manager")
|
114
|
+
dicom:Optional[MaleoClientManager] = Field(None, description="MaleoDICOM client manager")
|
115
|
+
scribe:Optional[MaleoClientManager] = Field(None, description="MaleoScribe client manager")
|
116
|
+
cds:Optional[MaleoClientManager] = Field(None, description="MaleoCDS client manager")
|
117
|
+
imaging:Optional[MaleoClientManager] = Field(None, description="MaleoImaging client manager")
|
118
|
+
mcu:Optional[MaleoClientManager] = Field(None, description="MaleoMCU client manager")
|
119
|
+
|
102
120
|
class ClientManagers(BaseModel):
|
103
121
|
google:GoogleClientManagers = Field(..., description="Google client's managers")
|
104
122
|
http:Type[HTTPClientManager] = Field(..., description="HTTP client's manager")
|
123
|
+
maleo:MaleoClientManagers = Field(..., description="Maleo client's managers")
|
105
124
|
|
106
125
|
class Config:
|
107
126
|
arbitrary_types_allowed=True
|
@@ -112,7 +131,9 @@ class ServiceManager:
|
|
112
131
|
db_metadata:MetaData,
|
113
132
|
base_dir:BaseTypes.OptionalString = None,
|
114
133
|
settings:Optional[Settings] = None,
|
115
|
-
google_cloud_logging:Optional[GoogleCloudLogging] = None
|
134
|
+
google_cloud_logging:Optional[GoogleCloudLogging] = None,
|
135
|
+
client_logger_managers:ClientLoggerManagers = {},
|
136
|
+
maleo_client_managers:Optional[MaleoClientManagers] = None
|
116
137
|
):
|
117
138
|
self._db_metadata = db_metadata
|
118
139
|
|
@@ -138,10 +159,17 @@ class ServiceManager:
|
|
138
159
|
else:
|
139
160
|
self._google_cloud_logging = google_cloud_logging
|
140
161
|
|
162
|
+
self._client_logger_managers = client_logger_managers
|
141
163
|
self._initialize_loggers()
|
142
164
|
self._load_credentials()
|
143
165
|
self._parse_keys()
|
144
166
|
self._initialize_db()
|
167
|
+
|
168
|
+
#* Initialize maleo client managers
|
169
|
+
if maleo_client_managers is None:
|
170
|
+
self._maleo_client_managers = MaleoClientManagers()
|
171
|
+
else:
|
172
|
+
self._maleo_client_managers = maleo_client_managers
|
145
173
|
self._initialize_clients()
|
146
174
|
|
147
175
|
@property
|
@@ -169,7 +197,11 @@ class ServiceManager:
|
|
169
197
|
application = ServiceLogger(logs_dir=self._logs_dir, type=BaseEnums.LoggerType.APPLICATION, google_cloud_logging=self._google_cloud_logging)
|
170
198
|
database = ServiceLogger(logs_dir=self._logs_dir, type=BaseEnums.LoggerType.DATABASE, google_cloud_logging=self._google_cloud_logging)
|
171
199
|
middleware = ServiceLogger(logs_dir=self._logs_dir, type=BaseEnums.LoggerType.MIDDLEWARE, google_cloud_logging=self._google_cloud_logging)
|
172
|
-
|
200
|
+
client = self._client_logger_managers
|
201
|
+
for key, logger_manager in client.items():
|
202
|
+
application.info(f"Initializing logger manager for client '{key}'")
|
203
|
+
logger_manager.initialize(logs_dir=self._logs_dir ,client_key=key)
|
204
|
+
self._loggers = Loggers(application=application, database=database, middleware=middleware, client=client)
|
173
205
|
|
174
206
|
@property
|
175
207
|
def loggers(self) -> Loggers:
|
@@ -225,7 +257,7 @@ class ServiceManager:
|
|
225
257
|
#* Initialize http clients
|
226
258
|
self._http_client = HTTPClientManager
|
227
259
|
self._http_client.initialize()
|
228
|
-
self._clients = ClientManagers(google=self._google_clients, http=self._http_client)
|
260
|
+
self._clients = ClientManagers(google=self._google_clients, http=self._http_client, maleo=self._maleo_client_managers)
|
229
261
|
|
230
262
|
@property
|
231
263
|
def google_clients(self) -> GoogleClientManagers:
|
@@ -258,6 +290,7 @@ class ServiceManager:
|
|
258
290
|
return result.data.token
|
259
291
|
|
260
292
|
async def dispose(self) -> None:
|
293
|
+
self._loggers.application.info("Disposing service manager")
|
261
294
|
if self._database is not None:
|
262
295
|
self._database.dispose()
|
263
296
|
self._database = None
|
@@ -1,8 +1,6 @@
|
|
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
|
6
4
|
from maleo_foundation.models.transfers.general.token import BaseTokenGeneralTransfers
|
7
5
|
from maleo_foundation.models.schemas.token import BaseTokenSchemas
|
8
6
|
from maleo_foundation.models.transfers.parameters.token import BaseTokenParametersTransfers
|
@@ -11,11 +9,6 @@ from maleo_foundation.expanded_types.token import BaseTokenResultsTypes
|
|
11
9
|
|
12
10
|
class BaseTokenService:
|
13
11
|
@staticmethod
|
14
|
-
# @BaseExceptions.service_exception_handler(
|
15
|
-
# operation="encoding a payload",
|
16
|
-
# logger_factory=MaleoFoundationLoggerManager.get,
|
17
|
-
# fail_result_class=BaseTokenResultsTransfers.Fail
|
18
|
-
# )
|
19
12
|
def encode(parameters:BaseTokenParametersTransfers.Encode) -> BaseTokenResultsTypes.Encode:
|
20
13
|
#* Serialize private key
|
21
14
|
private_key_bytes = parameters.key.encode()
|
@@ -27,17 +20,10 @@ class BaseTokenService:
|
|
27
20
|
payload = BaseTokenGeneralTransfers.EncodePayload.model_validate(parameters.payload.model_dump()).model_dump(mode="json")
|
28
21
|
token = jwt.encode(payload=payload, key=private_key, algorithm="RS256")
|
29
22
|
data = BaseTokenSchemas.Token(token=token)
|
30
|
-
# MaleoFoundationLoggerManager.get().info("Payload successfully encoded")
|
31
23
|
return BaseTokenResultsTransfers.Encode(data=data)
|
32
24
|
|
33
25
|
@staticmethod
|
34
|
-
# @BaseExceptions.service_exception_handler(
|
35
|
-
# operation="decoding a token",
|
36
|
-
# logger_factory=MaleoFoundationLoggerManager.get,
|
37
|
-
# fail_result_class=BaseTokenResultsTransfers.Fail
|
38
|
-
# )
|
39
26
|
def decode(parameters:BaseTokenParametersTransfers.Decode) -> BaseTokenResultsTypes.Decode:
|
40
27
|
payload = jwt.decode(jwt=parameters.token, key=parameters.key, algorithms=["RS256"])
|
41
28
|
data = BaseTokenGeneralTransfers.DecodePayload.model_validate(payload)
|
42
|
-
# MaleoFoundationLoggerManager.get().info("Token successfully decoded")
|
43
29
|
return BaseTokenResultsTransfers.Decode(data=data)
|
@@ -179,4 +179,27 @@ class ClientLogger(BaseLogger):
|
|
179
179
|
client_key=client_key,
|
180
180
|
level=level,
|
181
181
|
google_cloud_logging=google_cloud_logging
|
182
|
-
)
|
182
|
+
)
|
183
|
+
|
184
|
+
class ClientLoggerManager:
|
185
|
+
_logger:Optional[ClientLogger] = None
|
186
|
+
|
187
|
+
@classmethod
|
188
|
+
def initialize(
|
189
|
+
cls,
|
190
|
+
logs_dir:str,
|
191
|
+
client_key:str,
|
192
|
+
service_key:BaseTypes.OptionalString = None,
|
193
|
+
level:BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
|
194
|
+
google_cloud_logging:Optional[GoogleCloudLogging] = None
|
195
|
+
) -> None:
|
196
|
+
"""Initialize client logger if not already initialized."""
|
197
|
+
if cls._logger is None:
|
198
|
+
cls.logger = ClientLogger(logs_dir=logs_dir, client_key=client_key, service_key=service_key, level=level, google_cloud_logging=google_cloud_logging)
|
199
|
+
|
200
|
+
@classmethod
|
201
|
+
def get(cls) -> ClientLogger:
|
202
|
+
"""Return client logger (if exist) or raise Runtime Error"""
|
203
|
+
if cls._logger is None:
|
204
|
+
raise RuntimeError("Logger has not been initialized. Initialize it first.")
|
205
|
+
return cls._logger
|
@@ -16,7 +16,7 @@ maleo_foundation/clients/google/cloud/logging.py,sha256=s9T9bex0GeCPwIHrBRvilT23
|
|
16
16
|
maleo_foundation/clients/google/cloud/secret.py,sha256=1dua0V2FHesjltLdc1N4PF8xTXPzmcSA3sgwBzYNUtM,5853
|
17
17
|
maleo_foundation/clients/google/cloud/storage.py,sha256=t8hAZiQj_RFhJJXE8a20WP7spNKTEFw1RK1AqurL3T8,3848
|
18
18
|
maleo_foundation/clients/utils/__init__.py,sha256=hChEGABHH4tOFxPRcpxmlhkM9PgF18M7wXapH88hpu4,131
|
19
|
-
maleo_foundation/clients/utils/logger.py,sha256=
|
19
|
+
maleo_foundation/clients/utils/logger.py,sha256=V4jTDCI64dB83sEBTseJmCspZxuTTynaxaOPRUZdEk0,1927
|
20
20
|
maleo_foundation/db/__init__.py,sha256=fmvhCz4_siHfyKJujcUakKDKmuLxMhxn2w5tmfQwfcM,135
|
21
21
|
maleo_foundation/db/engine.py,sha256=hhYjCt5IEb864H2RNlUVS7GfMzuThHKRV260Bgkhn_o,3003
|
22
22
|
maleo_foundation/db/manager.py,sha256=nSstMJ9JBoEKTSLlz6MNf4Wuet8DLp2Pipfveg4kM1c,4663
|
@@ -30,10 +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=
|
33
|
+
maleo_foundation/managers/service.py,sha256=gAGp7eiWk1UzwiQ3ZIdTt71vyOE-aywI9Jc6ZwtLWg0,13510
|
34
34
|
maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
|
-
maleo_foundation/managers/client/base.py,sha256=
|
36
|
-
maleo_foundation/managers/client/http.py,sha256=
|
35
|
+
maleo_foundation/managers/client/base.py,sha256=GytrN4WB0oa8Flg6VHJ4oSg7kaWQBjXQ8GTwC4VFleY,965
|
36
|
+
maleo_foundation/managers/client/http.py,sha256=mxoi7hkvVKxjYPyc0fiB4So30ePr6eefMPsb8-cVRbk,2700
|
37
|
+
maleo_foundation/managers/client/maleo.py,sha256=VTUuikZ6auFJzBgyS2JsiESxnz5uC7B0PMHhyW1NAdg,3762
|
37
38
|
maleo_foundation/managers/client/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
39
|
maleo_foundation/managers/client/google/base.py,sha256=1lrGoyGnYW5Xq05bVXbKqnsqqmFPnsqZCBPK5-DINDA,1037
|
39
40
|
maleo_foundation/managers/client/google/secret.py,sha256=iKXaF8qNDXRYbmosS9bAXQFYwRdDZ3Kh2yKhBAaOoEI,3061
|
@@ -68,17 +69,17 @@ maleo_foundation/models/transfers/results/service/query.py,sha256=G5A4FRkHyRRlpu
|
|
68
69
|
maleo_foundation/models/transfers/results/service/controllers/__init__.py,sha256=HZJWMy2dskzOCzLmp_UaL9rjbQ-sDMI7sd2bXb-4QOU,175
|
69
70
|
maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=wCuFyOTQkuBs2cqjPsWnPy0XIsCfMqGByhrSy57qp7Y,1107
|
70
71
|
maleo_foundation/services/__init__.py,sha256=Ho5zJSA89xdGFKIwOdzjmd8sm23cIuwrqYAxCEBBTIU,120
|
71
|
-
maleo_foundation/services/token.py,sha256=
|
72
|
+
maleo_foundation/services/token.py,sha256=ZqRqOdGUnaSIam6-JHVdAW1UST-2EDtcVN0fpbPmXY4,1638
|
72
73
|
maleo_foundation/utils/__init__.py,sha256=FavmL5XYGCm955EAKiWWcXYeU15p5rSzfcglpV2yI6c,387
|
73
74
|
maleo_foundation/utils/controller.py,sha256=ECzPzpw36zBAjKcWcDbUAhIJGbc6UpeypdUUX6ipXBg,6396
|
74
75
|
maleo_foundation/utils/exceptions.py,sha256=nk3rD57fDR-D7BQkU1JEKV-Mu7FGMpLSEsqxdDZdKjU,4532
|
75
76
|
maleo_foundation/utils/keyloader.py,sha256=g7LYypj7UolmSgHRGXMFgVaWr55UayMdtKXR5NmB7VM,2341
|
76
77
|
maleo_foundation/utils/logger.py,sha256=uTvzzKnGjbxRVLHbiMDw2zKKWNaCwV35sxgjDStEwNQ,3569
|
77
|
-
maleo_foundation/utils/logging.py,sha256=
|
78
|
+
maleo_foundation/utils/logging.py,sha256=DuAaKQ1X7lB0y6udR-GF95BRKeluh0JoYN0K_jcNlZ0,7313
|
78
79
|
maleo_foundation/utils/query.py,sha256=ODQ3adOYQNj5E2cRW9ytbjBz56nEDcnfq8mQ6YZbCCM,4375
|
79
80
|
maleo_foundation/utils/formatter/__init__.py,sha256=iKf5YCbEdg1qKnFHyKqqcQbqAqEeRUf8mhI3v3dQoj8,78
|
80
81
|
maleo_foundation/utils/formatter/case.py,sha256=TmvvlfzGdC_omMTB5vAa40TZBxQ3hnr-SYeo0M52Rlg,1352
|
81
|
-
maleo_foundation-0.
|
82
|
-
maleo_foundation-0.
|
83
|
-
maleo_foundation-0.
|
84
|
-
maleo_foundation-0.
|
82
|
+
maleo_foundation-0.1.2.dist-info/METADATA,sha256=_AHR2lgxsotD4gHA-woEQaueUz2an0PLnq-QYpkW3y0,3189
|
83
|
+
maleo_foundation-0.1.2.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
|
84
|
+
maleo_foundation-0.1.2.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
85
|
+
maleo_foundation-0.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|