maleo-foundation 0.3.74__py3-none-any.whl → 0.3.76__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.
@@ -17,6 +17,10 @@ from maleo_foundation.models.transfers.general.request import RequestContext
17
17
  from .parser import parse_user_agent
18
18
 
19
19
 
20
+ def extract_operation_id(request: Request) -> UUID:
21
+ return request.state.operation_id
22
+
23
+
20
24
  def extract_authentication(request: Request) -> Authentication:
21
25
  # validate credentials
22
26
  request_credentials = request.auth
@@ -55,10 +59,6 @@ def extract_client_ip(conn: HTTPConnection) -> str:
55
59
  return conn.client.host if conn.client else "unknown"
56
60
 
57
61
 
58
- def extract_operation_id(request: Request) -> UUID:
59
- return request.state.operation_id
60
-
61
-
62
62
  def extract_request_context(request: Request) -> RequestContext:
63
63
  request_id = request.state.request_id
64
64
  requested_at = request.state.requested_at
@@ -46,8 +46,8 @@ class SimpleConfig(BaseModel):
46
46
  model_config = ConfigDict(arbitrary_types_allowed=True)
47
47
 
48
48
  dir: str = Field(..., description="Log's directory")
49
- level: BaseEnums.LoggerLevel = Field(
50
- BaseEnums.LoggerLevel.INFO, description="Log's level"
49
+ level: BaseEnums.LogLevel = Field(
50
+ BaseEnums.LogLevel.INFO, description="Log's level"
51
51
  )
52
52
  google_cloud_logging: Optional[GoogleCloudLogging] = Field(
53
53
  default_factory=GoogleCloudLogging, description="Google cloud logging"
@@ -62,7 +62,7 @@ class BaseLogger(logging.Logger):
62
62
  environment: Optional[BaseEnums.EnvironmentType] = None,
63
63
  service_key: Optional[BaseEnums.Service] = None,
64
64
  client_key: BaseTypes.OptionalString = None,
65
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
65
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
66
66
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
67
67
  ):
68
68
  self._type = type # * Declare logger type
@@ -181,7 +181,7 @@ class ApplicationLogger(BaseLogger):
181
181
  dir: str,
182
182
  environment: Optional[BaseEnums.EnvironmentType] = None,
183
183
  service_key: Optional[BaseEnums.Service] = None,
184
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
184
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
185
185
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
186
186
  ):
187
187
  super().__init__(
@@ -201,7 +201,7 @@ class CacheLogger(BaseLogger):
201
201
  dir: str,
202
202
  environment: Optional[BaseEnums.EnvironmentType] = None,
203
203
  service_key: Optional[BaseEnums.Service] = None,
204
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
204
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
205
205
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
206
206
  ):
207
207
  super().__init__(
@@ -222,7 +222,7 @@ class ClientLogger(BaseLogger):
222
222
  client_key: str,
223
223
  environment: Optional[BaseEnums.EnvironmentType] = None,
224
224
  service_key: Optional[BaseEnums.Service] = None,
225
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
225
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
226
226
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
227
227
  ):
228
228
  super().__init__(
@@ -242,7 +242,7 @@ class ControllerLogger(BaseLogger):
242
242
  dir: str,
243
243
  environment: Optional[BaseEnums.EnvironmentType] = None,
244
244
  service_key: Optional[BaseEnums.Service] = None,
245
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
245
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
246
246
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
247
247
  ):
248
248
  super().__init__(
@@ -262,7 +262,7 @@ class DatabaseLogger(BaseLogger):
262
262
  dir: str,
263
263
  environment: Optional[BaseEnums.EnvironmentType] = None,
264
264
  service_key: Optional[BaseEnums.Service] = None,
265
- level=BaseEnums.LoggerLevel.INFO,
265
+ level=BaseEnums.LogLevel.INFO,
266
266
  google_cloud_logging=None,
267
267
  ):
268
268
  super().__init__(
@@ -282,7 +282,7 @@ class MiddlewareLogger(BaseLogger):
282
282
  dir: str,
283
283
  environment: Optional[BaseEnums.EnvironmentType] = None,
284
284
  service_key: Optional[BaseEnums.Service] = None,
285
- level=BaseEnums.LoggerLevel.INFO,
285
+ level=BaseEnums.LogLevel.INFO,
286
286
  google_cloud_logging=None,
287
287
  ):
288
288
  super().__init__(
@@ -302,7 +302,7 @@ class RouterLogger(BaseLogger):
302
302
  dir: str,
303
303
  environment: Optional[BaseEnums.EnvironmentType] = None,
304
304
  service_key: Optional[BaseEnums.Service] = None,
305
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
305
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
306
306
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
307
307
  ):
308
308
  super().__init__(
@@ -322,7 +322,7 @@ class RepositoryLogger(BaseLogger):
322
322
  dir: str,
323
323
  environment: Optional[BaseEnums.EnvironmentType] = None,
324
324
  service_key: Optional[BaseEnums.Service] = None,
325
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
325
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
326
326
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
327
327
  ):
328
328
  super().__init__(
@@ -342,7 +342,7 @@ class ServiceLogger(BaseLogger):
342
342
  dir: str,
343
343
  environment: Optional[BaseEnums.EnvironmentType] = None,
344
344
  service_key: Optional[BaseEnums.Service] = None,
345
- level: BaseEnums.LoggerLevel = BaseEnums.LoggerLevel.INFO,
345
+ level: BaseEnums.LogLevel = BaseEnums.LogLevel.INFO,
346
346
  google_cloud_logging: Optional[GoogleCloudLogging] = None,
347
347
  ):
348
348
  super().__init__(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.3.74
3
+ Version: 0.3.76
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -101,6 +101,7 @@ Requires-Dist: typing_extensions>=4.13.2
101
101
  Requires-Dist: ua-parser>=1.0.1
102
102
  Requires-Dist: ua-parser-builtins>=0.18.0.post1
103
103
  Requires-Dist: urllib3>=2.4.0
104
+ Requires-Dist: user-agents>=2.2.0
104
105
  Requires-Dist: uvicorn>=0.34.2
105
106
  Requires-Dist: virtualenv>=20.31.2
106
107
  Requires-Dist: wrapt>=1.17.2
@@ -122,8 +122,8 @@ maleo_foundation/utils/__init__.py,sha256=advf6IhKQOz64jbI0f9gyabHWa7ti8wTYDkYLD
122
122
  maleo_foundation/utils/cache.py,sha256=PWNef00iA2m0g3boR7JbzrJQIRITf5nKgdCmMs3s6ag,1159
123
123
  maleo_foundation/utils/client.py,sha256=KDkIEqGX6Tw07Z5HHW4HrG8IWUVkErlqnVijXnpWZGQ,2940
124
124
  maleo_foundation/utils/controller.py,sha256=S69NluxjGCB_toAu3JDLi_izE0-x2ARE_7YK3V8T1Q0,7413
125
- maleo_foundation/utils/extractor.py,sha256=gCJf-X-mlpnONcXe7DfLqfbJVjeHiHBMi-G0u9U5iSw,3527
126
- maleo_foundation/utils/logging.py,sha256=IZufHwMfIujwfPhSe4ad3ld5yFNLqWbbem0PRe2OWSE,11774
125
+ maleo_foundation/utils/extractor.py,sha256=e8Vc4o61Py3rZUNnL7-CoRmFCFeHhWTbbyrkKnSP0Po,3527
126
+ maleo_foundation/utils/logging.py,sha256=f9sLv_pgGRBSnCRIwINzhFAf2aYO6-nnFIPChoBiIt0,11714
127
127
  maleo_foundation/utils/merger.py,sha256=UGiuH0EUQJu0WlS1xdPUuvnsNknd3k0DODjdiOTiBdI,704
128
128
  maleo_foundation/utils/parser.py,sha256=xkIMpG4z2pgAK7OsWmdlpSw63yjV9v7nNKY0nqEJouU,300
129
129
  maleo_foundation/utils/query.py,sha256=mAoXadZuWx_ic6Z4VQ9K4GZxYgSNzpNS94W6xxqeFyg,8312
@@ -142,7 +142,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=g-cAxkTE2EtHaG8Tv52
142
142
  maleo_foundation/utils/loaders/credential/google.py,sha256=GCJl-bsKSSxoE_ERAkIzRrRNIbIEeqYOhHwzFuBr0mk,6576
143
143
  maleo_foundation/utils/loaders/key/__init__.py,sha256=RfqIbUxkdlx1xrbzJZPD_JHiRFNFLRuQs8JoUPCGCv4,108
144
144
  maleo_foundation/utils/loaders/key/rsa.py,sha256=UXcP0rr4QVacTsHLNQuU05wcow5CHWz-JW-zsVxlbPs,4121
145
- maleo_foundation-0.3.74.dist-info/METADATA,sha256=tz_KKWXLtaGTpCcyfN3R-E-N1LEy7CTY-yxjGVOr-BE,4230
146
- maleo_foundation-0.3.74.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
147
- maleo_foundation-0.3.74.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
148
- maleo_foundation-0.3.74.dist-info/RECORD,,
145
+ maleo_foundation-0.3.76.dist-info/METADATA,sha256=pT0M0XUs1SH_a5BWB-vOgpjr81-NFwGW1HDFtsUgcI0,4264
146
+ maleo_foundation-0.3.76.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
147
+ maleo_foundation-0.3.76.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
148
+ maleo_foundation-0.3.76.dist-info/RECORD,,