maleo-foundation 0.2.27__py3-none-any.whl → 0.2.28__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.
@@ -0,0 +1,25 @@
1
+ import json
2
+ from typing import Callable
3
+ from fastapi.encoders import jsonable_encoder
4
+
5
+ class BaseCacheConfigurations:
6
+ @staticmethod
7
+ def key_builder(func: Callable, *args, **kwargs) -> str:
8
+ arg_values = []
9
+ for arg in args:
10
+ try:
11
+ arg_values.append(jsonable_encoder(arg))
12
+ except Exception:
13
+ arg_values.append(str(arg))
14
+
15
+ kwarg_values = {}
16
+ for k, v in kwargs.items():
17
+ try:
18
+ kwarg_values[k] = jsonable_encoder(v)
19
+ except Exception:
20
+ kwarg_values[k] = str(v)
21
+
22
+ serialized_args = json.dumps(arg_values, sort_keys=True)
23
+ serialized_kwargs = json.dumps(kwarg_values, sort_keys=True)
24
+
25
+ return f"{func.__module__}:{func.__qualname__}({serialized_args}|{serialized_kwargs})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo_foundation
3
- Version: 0.2.27
3
+ Version: 0.2.28
4
4
  Summary: Foundation package for Maleo
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: MIT
@@ -35,6 +35,7 @@ maleo_foundation/managers/db.py,sha256=cpY1IOiUytT9XXYtzS0E9OSYOuB7jBKo0XHe__uI1
35
35
  maleo_foundation/managers/middleware.py,sha256=ODIQU1Hpu-Xempjjo_VRbVtxiD5oi74mNuoWuDawRh0,4250
36
36
  maleo_foundation/managers/service.py,sha256=i__-ISJ9YQi08nMRl6_j8jOVJB--A-tpGwWPF3FvoqM,18991
37
37
  maleo_foundation/managers/cache/__init__.py,sha256=CeY0oof2bVl_v5WS-FKXNwn2gf3xrEMfUsHK9cHo59s,471
38
+ maleo_foundation/managers/cache/base.py,sha256=YyPjde4KTsp2IHV6NdFMysa0ev-1GX1rtX-0jQPuIBU,837
38
39
  maleo_foundation/managers/cache/redis.py,sha256=vUpQUAKP_wZb_Fr1wEzICDCPQyBW8jnZ-pktl6AIdmY,1021
39
40
  maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
41
  maleo_foundation/managers/client/base.py,sha256=AlMsdxIsu2U8BLT2SyEXC7YQXDZjVPZfEmHvV_IUv18,4430
@@ -114,7 +115,7 @@ maleo_foundation/utils/loaders/credential/__init__.py,sha256=qopTKvcMVoTFwyRijeg
114
115
  maleo_foundation/utils/loaders/credential/google.py,sha256=SKsqPuFnAiCcYLf24CxKnMybhVHpgqnq1gGSlThqjts,994
115
116
  maleo_foundation/utils/loaders/key/__init__.py,sha256=hVygcC2ImHc_aVrSrOmyedR8tMUZokWUKCKOSh5ctbo,106
116
117
  maleo_foundation/utils/loaders/key/rsa.py,sha256=gDhyX6iTFtHiluuhFCozaZ3pOLKU2Y9TlrNMK_GVyGU,3796
117
- maleo_foundation-0.2.27.dist-info/METADATA,sha256=dCd2rxF1U22s3I1YrELXJJGWpMfhz9tuZEU729v4_a4,3598
118
- maleo_foundation-0.2.27.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
119
- maleo_foundation-0.2.27.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
120
- maleo_foundation-0.2.27.dist-info/RECORD,,
118
+ maleo_foundation-0.2.28.dist-info/METADATA,sha256=IDvJyZhnLaue3MHhdff2_aGyyVLvBDEbDEl0iOn9gIk,3598
119
+ maleo_foundation-0.2.28.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
120
+ maleo_foundation-0.2.28.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
121
+ maleo_foundation-0.2.28.dist-info/RECORD,,