maleo-foundation 0.3.46__py3-none-any.whl → 0.3.48__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/authentication.py +24 -13
- maleo_foundation/authorization.py +2 -1
- maleo_foundation/client/manager.py +22 -21
- maleo_foundation/client/services/__init__.py +16 -7
- maleo_foundation/client/services/encryption/__init__.py +13 -4
- maleo_foundation/client/services/encryption/aes.py +41 -36
- maleo_foundation/client/services/encryption/rsa.py +50 -50
- maleo_foundation/client/services/hash/__init__.py +19 -6
- maleo_foundation/client/services/hash/bcrypt.py +20 -18
- maleo_foundation/client/services/hash/hmac.py +20 -17
- maleo_foundation/client/services/hash/sha256.py +18 -15
- maleo_foundation/client/services/key.py +50 -42
- maleo_foundation/client/services/signature.py +46 -42
- maleo_foundation/client/services/token.py +49 -58
- maleo_foundation/constants.py +12 -19
- maleo_foundation/enums.py +14 -13
- maleo_foundation/expanded_types/__init__.py +2 -3
- maleo_foundation/expanded_types/client.py +30 -34
- maleo_foundation/expanded_types/encryption/__init__.py +2 -1
- maleo_foundation/expanded_types/encryption/aes.py +7 -5
- maleo_foundation/expanded_types/encryption/rsa.py +7 -5
- maleo_foundation/expanded_types/general.py +13 -11
- maleo_foundation/expanded_types/hash.py +7 -5
- maleo_foundation/expanded_types/key.py +8 -6
- maleo_foundation/expanded_types/service.py +30 -34
- maleo_foundation/expanded_types/signature.py +7 -5
- maleo_foundation/expanded_types/token.py +7 -5
- maleo_foundation/extended_types.py +4 -3
- maleo_foundation/managers/cache.py +2 -1
- maleo_foundation/managers/client/base.py +25 -12
- maleo_foundation/managers/client/google/base.py +11 -4
- maleo_foundation/managers/client/google/parameter.py +9 -11
- maleo_foundation/managers/client/google/secret.py +53 -35
- maleo_foundation/managers/client/google/storage.py +52 -22
- maleo_foundation/managers/client/google/subscription.py +37 -39
- maleo_foundation/managers/client/maleo.py +18 -23
- maleo_foundation/managers/configuration.py +5 -9
- maleo_foundation/managers/credential.py +14 -17
- maleo_foundation/managers/db.py +51 -40
- maleo_foundation/managers/middleware.py +9 -9
- maleo_foundation/managers/service.py +47 -54
- maleo_foundation/middlewares/authentication.py +29 -54
- maleo_foundation/middlewares/base.py +83 -72
- maleo_foundation/middlewares/cors.py +8 -7
- maleo_foundation/models/__init__.py +2 -1
- maleo_foundation/models/responses.py +57 -29
- maleo_foundation/models/schemas/__init__.py +2 -1
- maleo_foundation/models/schemas/encryption.py +5 -2
- maleo_foundation/models/schemas/general.py +38 -18
- maleo_foundation/models/schemas/hash.py +2 -1
- maleo_foundation/models/schemas/key.py +5 -2
- maleo_foundation/models/schemas/parameter.py +45 -15
- maleo_foundation/models/schemas/result.py +35 -20
- maleo_foundation/models/schemas/signature.py +5 -2
- maleo_foundation/models/schemas/token.py +5 -2
- maleo_foundation/models/table.py +33 -27
- maleo_foundation/models/transfers/__init__.py +2 -1
- maleo_foundation/models/transfers/general/__init__.py +2 -1
- maleo_foundation/models/transfers/general/configurations/__init__.py +10 -4
- maleo_foundation/models/transfers/general/configurations/cache/__init__.py +3 -2
- maleo_foundation/models/transfers/general/configurations/cache/redis.py +13 -5
- maleo_foundation/models/transfers/general/configurations/client/__init__.py +5 -1
- maleo_foundation/models/transfers/general/configurations/client/maleo.py +38 -12
- maleo_foundation/models/transfers/general/configurations/database.py +5 -2
- maleo_foundation/models/transfers/general/configurations/middleware.py +22 -15
- maleo_foundation/models/transfers/general/configurations/service.py +2 -1
- maleo_foundation/models/transfers/general/credentials.py +2 -1
- maleo_foundation/models/transfers/general/database.py +11 -4
- maleo_foundation/models/transfers/general/key.py +13 -4
- maleo_foundation/models/transfers/general/request.py +28 -9
- maleo_foundation/models/transfers/general/settings.py +12 -22
- maleo_foundation/models/transfers/general/signature.py +4 -2
- maleo_foundation/models/transfers/general/token.py +34 -27
- maleo_foundation/models/transfers/parameters/__init__.py +2 -1
- maleo_foundation/models/transfers/parameters/client.py +15 -19
- maleo_foundation/models/transfers/parameters/encryption/__init__.py +2 -1
- maleo_foundation/models/transfers/parameters/encryption/aes.py +7 -5
- maleo_foundation/models/transfers/parameters/encryption/rsa.py +7 -5
- maleo_foundation/models/transfers/parameters/general.py +15 -13
- maleo_foundation/models/transfers/parameters/hash/__init__.py +2 -1
- maleo_foundation/models/transfers/parameters/hash/bcrypt.py +5 -5
- maleo_foundation/models/transfers/parameters/hash/hmac.py +6 -6
- maleo_foundation/models/transfers/parameters/hash/sha256.py +5 -5
- maleo_foundation/models/transfers/parameters/key.py +9 -8
- maleo_foundation/models/transfers/parameters/service.py +42 -48
- maleo_foundation/models/transfers/parameters/signature.py +7 -4
- maleo_foundation/models/transfers/parameters/token.py +10 -10
- maleo_foundation/models/transfers/results/__init__.py +2 -1
- maleo_foundation/models/transfers/results/client/__init__.py +2 -1
- maleo_foundation/models/transfers/results/client/controllers/__init__.py +2 -1
- maleo_foundation/models/transfers/results/client/controllers/http.py +10 -7
- maleo_foundation/models/transfers/results/client/service.py +12 -6
- maleo_foundation/models/transfers/results/encryption/__init__.py +2 -1
- maleo_foundation/models/transfers/results/encryption/aes.py +13 -5
- maleo_foundation/models/transfers/results/encryption/rsa.py +12 -4
- maleo_foundation/models/transfers/results/hash.py +7 -3
- maleo_foundation/models/transfers/results/key.py +18 -6
- maleo_foundation/models/transfers/results/service/__init__.py +2 -3
- maleo_foundation/models/transfers/results/service/controllers/__init__.py +2 -1
- maleo_foundation/models/transfers/results/service/controllers/rest.py +14 -11
- maleo_foundation/models/transfers/results/service/general.py +16 -10
- maleo_foundation/models/transfers/results/signature.py +12 -4
- maleo_foundation/models/transfers/results/token.py +10 -4
- maleo_foundation/rest_controller_result.py +23 -21
- maleo_foundation/types.py +15 -14
- maleo_foundation/utils/__init__.py +2 -1
- maleo_foundation/utils/cache.py +10 -13
- maleo_foundation/utils/client.py +25 -12
- maleo_foundation/utils/controller.py +59 -37
- maleo_foundation/utils/dependencies/__init__.py +2 -1
- maleo_foundation/utils/dependencies/auth.py +5 -12
- maleo_foundation/utils/dependencies/context.py +3 -4
- maleo_foundation/utils/exceptions.py +50 -28
- maleo_foundation/utils/extractor.py +18 -6
- maleo_foundation/utils/formatter/__init__.py +2 -1
- maleo_foundation/utils/formatter/case.py +5 -4
- maleo_foundation/utils/loaders/__init__.py +2 -1
- maleo_foundation/utils/loaders/credential/__init__.py +2 -1
- maleo_foundation/utils/loaders/credential/google.py +29 -15
- maleo_foundation/utils/loaders/json.py +3 -2
- maleo_foundation/utils/loaders/key/__init__.py +2 -1
- maleo_foundation/utils/loaders/key/rsa.py +26 -13
- maleo_foundation/utils/loaders/yaml.py +2 -1
- maleo_foundation/utils/logging.py +70 -46
- maleo_foundation/utils/merger.py +7 -9
- maleo_foundation/utils/query.py +41 -34
- maleo_foundation/utils/repository.py +29 -16
- maleo_foundation/utils/searcher.py +4 -6
- {maleo_foundation-0.3.46.dist-info → maleo_foundation-0.3.48.dist-info}/METADATA +14 -1
- maleo_foundation-0.3.48.dist-info/RECORD +137 -0
- maleo_foundation/expanded_types/repository.py +0 -68
- maleo_foundation/models/transfers/results/service/repository.py +0 -39
- maleo_foundation-0.3.46.dist-info/RECORD +0 -139
- {maleo_foundation-0.3.46.dist-info → maleo_foundation-0.3.48.dist-info}/WHEEL +0 -0
- {maleo_foundation-0.3.46.dist-info → maleo_foundation-0.3.48.dist-info}/top_level.txt +0 -0
maleo_foundation/utils/query.py
CHANGED
@@ -8,6 +8,7 @@ from typing import Type
|
|
8
8
|
from maleo_foundation.types import BaseTypes
|
9
9
|
from maleo_foundation.extended_types import ExtendedTypes
|
10
10
|
|
11
|
+
|
11
12
|
class BaseQueryUtils:
|
12
13
|
@staticmethod
|
13
14
|
def filter_column(
|
@@ -15,7 +16,7 @@ class BaseQueryUtils:
|
|
15
16
|
table: Type[DeclarativeMeta],
|
16
17
|
column: str,
|
17
18
|
value: BaseTypes.OptionalAny = None,
|
18
|
-
include_null: bool = False
|
19
|
+
include_null: bool = False,
|
19
20
|
) -> Query:
|
20
21
|
column_attr = getattr(table, column, None)
|
21
22
|
if column_attr is None or not isinstance(column_attr, InstrumentedAttribute):
|
@@ -38,7 +39,7 @@ class BaseQueryUtils:
|
|
38
39
|
table: Type[DeclarativeMeta],
|
39
40
|
column: str,
|
40
41
|
ids: BaseTypes.OptionalListOfIntegers = None,
|
41
|
-
include_null: bool = False
|
42
|
+
include_null: bool = False,
|
42
43
|
) -> Query:
|
43
44
|
column_attr = getattr(table, column, None)
|
44
45
|
if column_attr is None or not isinstance(column_attr, InstrumentedAttribute):
|
@@ -58,21 +59,22 @@ class BaseQueryUtils:
|
|
58
59
|
@staticmethod
|
59
60
|
def filter_timestamps(
|
60
61
|
query: Query,
|
61
|
-
table: Type[DeclarativeMeta],
|
62
|
-
date_filters: ExtendedTypes.ListOfDateFilters
|
62
|
+
table: Type[DeclarativeMeta], # type: ignore
|
63
|
+
date_filters: ExtendedTypes.ListOfDateFilters,
|
63
64
|
) -> Query:
|
64
65
|
if date_filters and len(date_filters) > 0:
|
65
66
|
for date_filter in date_filters:
|
66
67
|
try:
|
67
|
-
table:Table = table.__table__
|
68
|
-
column:Column = table.columns[date_filter.name]
|
69
|
-
column_attr:InstrumentedAttribute = getattr(
|
68
|
+
table: Table = table.__table__ # type: ignore
|
69
|
+
column: Column = table.columns[date_filter.name]
|
70
|
+
column_attr: InstrumentedAttribute = getattr(
|
71
|
+
table, date_filter.name
|
72
|
+
)
|
70
73
|
if isinstance(column.type, (TIMESTAMP, DATE)):
|
71
74
|
if date_filter.from_date and date_filter.to_date:
|
72
75
|
query = query.filter(
|
73
76
|
column_attr.between(
|
74
|
-
date_filter.from_date,
|
75
|
-
date_filter.to_date
|
77
|
+
date_filter.from_date, date_filter.to_date
|
76
78
|
)
|
77
79
|
)
|
78
80
|
elif date_filter.from_date:
|
@@ -87,10 +89,10 @@ class BaseQueryUtils:
|
|
87
89
|
def filter_statuses(
|
88
90
|
query: Query,
|
89
91
|
table: Type[DeclarativeMeta],
|
90
|
-
statuses: BaseTypes.OptionalListOfStatuses
|
92
|
+
statuses: BaseTypes.OptionalListOfStatuses,
|
91
93
|
) -> Query:
|
92
94
|
if statuses is not None:
|
93
|
-
status_filters = [table.status == status for status in statuses]
|
95
|
+
status_filters = [table.status == status for status in statuses] # type: ignore
|
94
96
|
query = query.filter(or_(*status_filters))
|
95
97
|
return query
|
96
98
|
|
@@ -99,13 +101,15 @@ class BaseQueryUtils:
|
|
99
101
|
query: Query,
|
100
102
|
table: Type[DeclarativeMeta],
|
101
103
|
parent_column: str = "parent_id",
|
102
|
-
is_root: BaseTypes.OptionalBoolean=None
|
104
|
+
is_root: BaseTypes.OptionalBoolean = None,
|
103
105
|
) -> Query:
|
104
106
|
parent_attr = getattr(table, parent_column, None)
|
105
107
|
if parent_attr is None or not isinstance(parent_attr, InstrumentedAttribute):
|
106
108
|
return query
|
107
109
|
if is_root is not None:
|
108
|
-
query = query.filter(
|
110
|
+
query = query.filter(
|
111
|
+
parent_attr.is_(None) if is_root else parent_attr.is_not(None)
|
112
|
+
)
|
109
113
|
return query
|
110
114
|
|
111
115
|
@staticmethod
|
@@ -115,7 +119,7 @@ class BaseQueryUtils:
|
|
115
119
|
table: Type[DeclarativeMeta],
|
116
120
|
id_column: str = "id",
|
117
121
|
parent_column: str = "parent_id",
|
118
|
-
is_parent: BaseTypes.OptionalBoolean = None
|
122
|
+
is_parent: BaseTypes.OptionalBoolean = None,
|
119
123
|
) -> Query:
|
120
124
|
id_attr = getattr(table, id_column, None)
|
121
125
|
if id_attr is None or not isinstance(id_attr, InstrumentedAttribute):
|
@@ -126,7 +130,9 @@ class BaseQueryUtils:
|
|
126
130
|
if is_parent is not None:
|
127
131
|
child_table = aliased(table)
|
128
132
|
child_parent_attr = getattr(child_table, parent_column)
|
129
|
-
subq =
|
133
|
+
subq = (
|
134
|
+
session.query(child_table).filter(child_parent_attr == id_attr).exists()
|
135
|
+
)
|
130
136
|
query = query.filter(subq if is_parent else ~subq)
|
131
137
|
return query
|
132
138
|
|
@@ -135,13 +141,15 @@ class BaseQueryUtils:
|
|
135
141
|
query: Query,
|
136
142
|
table: Type[DeclarativeMeta],
|
137
143
|
parent_column: str = "parent_id",
|
138
|
-
is_child: BaseTypes.OptionalBoolean = None
|
144
|
+
is_child: BaseTypes.OptionalBoolean = None,
|
139
145
|
) -> Query:
|
140
146
|
parent_attr = getattr(table, parent_column, None)
|
141
147
|
if parent_attr is None or not isinstance(parent_attr, InstrumentedAttribute):
|
142
148
|
return query
|
143
149
|
if is_child is not None:
|
144
|
-
query = query.filter(
|
150
|
+
query = query.filter(
|
151
|
+
parent_attr.is_not(None) if is_child else parent_attr.is_(None)
|
152
|
+
)
|
145
153
|
return query
|
146
154
|
|
147
155
|
@staticmethod
|
@@ -151,7 +159,7 @@ class BaseQueryUtils:
|
|
151
159
|
table: Type[DeclarativeMeta],
|
152
160
|
id_column: str = "id",
|
153
161
|
parent_column: str = "parent_id",
|
154
|
-
is_leaf: BaseTypes.OptionalBoolean = None
|
162
|
+
is_leaf: BaseTypes.OptionalBoolean = None,
|
155
163
|
) -> Query:
|
156
164
|
id_attr = getattr(table, id_column, None)
|
157
165
|
if id_attr is None or not isinstance(id_attr, InstrumentedAttribute):
|
@@ -162,20 +170,20 @@ class BaseQueryUtils:
|
|
162
170
|
if is_leaf is not None:
|
163
171
|
child_table = aliased(table)
|
164
172
|
child_parent_attr = getattr(child_table, parent_column)
|
165
|
-
subq =
|
173
|
+
subq = (
|
174
|
+
session.query(child_table).filter(child_parent_attr == id_attr).exists()
|
175
|
+
)
|
166
176
|
query = query.filter(~subq if is_leaf else subq)
|
167
177
|
return query
|
168
178
|
|
169
179
|
@staticmethod
|
170
180
|
def filter_search(
|
171
|
-
query: Query,
|
172
|
-
table: Type[DeclarativeMeta],
|
173
|
-
search: BaseTypes.OptionalString
|
181
|
+
query: Query, table: Type[DeclarativeMeta], search: BaseTypes.OptionalString
|
174
182
|
) -> Query:
|
175
183
|
if search:
|
176
|
-
search_term = f"%{search}%"
|
184
|
+
search_term = f"%{search}%" # * Use wildcard for partial matching
|
177
185
|
search_filters = []
|
178
|
-
sqla_table:Table = table.__table__
|
186
|
+
sqla_table: Table = table.__table__ # type: ignore
|
179
187
|
for name, attr in vars(table).items():
|
180
188
|
try:
|
181
189
|
column: Column = sqla_table.columns[name]
|
@@ -189,28 +197,27 @@ class BaseQueryUtils:
|
|
189
197
|
query = query.filter(or_(*search_filters))
|
190
198
|
return query
|
191
199
|
|
192
|
-
|
193
200
|
@staticmethod
|
194
201
|
def sort(
|
195
202
|
query: Query,
|
196
203
|
table: Type[DeclarativeMeta],
|
197
|
-
sort_columns: ExtendedTypes.ListOfSortColumns
|
204
|
+
sort_columns: ExtendedTypes.ListOfSortColumns,
|
198
205
|
) -> Query:
|
199
206
|
for sort_column in sort_columns:
|
200
207
|
try:
|
201
208
|
sort_col = getattr(table, sort_column.name)
|
202
|
-
sort_col =
|
209
|
+
sort_col = (
|
210
|
+
asc(sort_col)
|
211
|
+
if sort_column.order.value.lower() == "asc"
|
212
|
+
else desc(sort_col)
|
213
|
+
)
|
203
214
|
query = query.order_by(sort_col)
|
204
215
|
except AttributeError:
|
205
216
|
continue
|
206
217
|
return query
|
207
218
|
|
208
219
|
@staticmethod
|
209
|
-
def paginate(
|
210
|
-
|
211
|
-
page: int,
|
212
|
-
limit: int
|
213
|
-
) -> Query:
|
214
|
-
offset: int = int((page - 1) * limit) #* Calculate offset based on page
|
220
|
+
def paginate(query: Query, page: int, limit: int) -> Query:
|
221
|
+
offset: int = int((page - 1) * limit) # * Calculate offset based on page
|
215
222
|
query = query.limit(limit=limit).offset(offset=offset)
|
216
|
-
return query
|
223
|
+
return query
|
@@ -3,59 +3,72 @@ from functools import wraps
|
|
3
3
|
from pydantic import ValidationError
|
4
4
|
from typing import Optional, Type, Union
|
5
5
|
from maleo_foundation.types import BaseTypes
|
6
|
-
from maleo_foundation.models.transfers.results.service.
|
7
|
-
|
6
|
+
from maleo_foundation.models.transfers.results.service.general import (
|
7
|
+
BaseServiceGeneralResultsTransfers,
|
8
|
+
)
|
9
|
+
|
8
10
|
|
9
11
|
class BaseRepositoryUtils:
|
10
12
|
@staticmethod
|
11
13
|
def result_processor(
|
12
|
-
fail_class: Type[
|
14
|
+
fail_class: Type[BaseServiceGeneralResultsTransfers.Fail],
|
13
15
|
data_found_class: Union[
|
14
|
-
Type[
|
15
|
-
Type[
|
16
|
-
Type[
|
16
|
+
Type[BaseServiceGeneralResultsTransfers.SingleData],
|
17
|
+
Type[BaseServiceGeneralResultsTransfers.UnpaginatedMultipleData],
|
18
|
+
Type[BaseServiceGeneralResultsTransfers.PaginatedMultipleData],
|
17
19
|
],
|
18
|
-
no_data_class: Optional[Type[
|
20
|
+
no_data_class: Optional[Type[BaseServiceGeneralResultsTransfers.NoData]] = None,
|
19
21
|
):
|
20
22
|
"""Decorator to handle repository-related exceptions consistently."""
|
23
|
+
|
21
24
|
def decorator(func):
|
22
25
|
def _processor(result: BaseTypes.StringToAnyDict):
|
23
26
|
if "success" not in result and "data" not in result:
|
24
|
-
raise ValueError(
|
25
|
-
|
26
|
-
|
27
|
+
raise ValueError(
|
28
|
+
"Result did not have both 'success' and 'data' field"
|
29
|
+
)
|
30
|
+
success: bool = result.get("success", False)
|
31
|
+
data: BaseTypes.StringToAnyDict = result.get("data", {})
|
27
32
|
if not success:
|
28
33
|
validated_result = fail_class.model_validate(result)
|
29
34
|
return validated_result
|
30
35
|
else:
|
31
36
|
if data is None:
|
32
37
|
if no_data_class is None:
|
33
|
-
raise ValueError(
|
38
|
+
raise ValueError(
|
39
|
+
"'no_data_class' must be given to validate No Data"
|
40
|
+
)
|
34
41
|
validated_result = no_data_class.model_validate(result)
|
35
42
|
return validated_result
|
36
43
|
else:
|
37
44
|
validated_result = data_found_class.model_validate(result)
|
38
45
|
return validated_result
|
46
|
+
|
39
47
|
if asyncio.iscoroutinefunction(func):
|
48
|
+
|
40
49
|
@wraps(func)
|
41
50
|
async def async_wrapper(*args, **kwargs):
|
42
51
|
try:
|
43
52
|
result: BaseTypes.StringToAnyDict = await func(*args, **kwargs)
|
44
53
|
return _processor(result=result)
|
45
|
-
except ValidationError
|
54
|
+
except ValidationError:
|
46
55
|
raise
|
47
|
-
except Exception
|
56
|
+
except Exception:
|
48
57
|
raise
|
58
|
+
|
49
59
|
return async_wrapper
|
50
60
|
else:
|
61
|
+
|
51
62
|
@wraps(func)
|
52
63
|
def sync_wrapper(*args, **kwargs):
|
53
64
|
try:
|
54
65
|
result: BaseTypes.StringToAnyDict = func(*args, **kwargs)
|
55
66
|
return _processor(result=result)
|
56
|
-
except ValidationError
|
67
|
+
except ValidationError:
|
57
68
|
raise
|
58
|
-
except Exception
|
69
|
+
except Exception:
|
59
70
|
raise
|
71
|
+
|
60
72
|
return sync_wrapper
|
61
|
-
|
73
|
+
|
74
|
+
return decorator
|
@@ -1,9 +1,7 @@
|
|
1
|
-
from typing import Dict, List
|
1
|
+
from typing import Dict, List, Union
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
key: str
|
6
|
-
) -> List:
|
3
|
+
|
4
|
+
def deep_search(d: Union[Dict, List], key: str) -> List:
|
7
5
|
"""Recursively search for all values of a key in a nested Dict/List."""
|
8
6
|
results = []
|
9
7
|
if isinstance(d, Dict):
|
@@ -15,4 +13,4 @@ def deep_search(
|
|
15
13
|
elif isinstance(d, List):
|
16
14
|
for item in d:
|
17
15
|
results.extend(deep_search(item, key))
|
18
|
-
return results
|
16
|
+
return results
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: maleo_foundation
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.48
|
4
4
|
Summary: Foundation package for Maleo
|
5
5
|
Author-email: Agra Bima Yuda <agra@nexmedis.com>
|
6
6
|
License: MIT
|
@@ -12,16 +12,20 @@ Requires-Dist: annotated-types>=0.7.0
|
|
12
12
|
Requires-Dist: anyio>=4.9.0
|
13
13
|
Requires-Dist: async-timeout>=5.0.1
|
14
14
|
Requires-Dist: bcrypt>=4.3.0
|
15
|
+
Requires-Dist: black>=25.1.0
|
15
16
|
Requires-Dist: build>=1.2.2.post1
|
16
17
|
Requires-Dist: cachetools>=5.5.2
|
17
18
|
Requires-Dist: certifi>=2025.1.31
|
18
19
|
Requires-Dist: cffi>=1.17.1
|
20
|
+
Requires-Dist: cfgv>=3.4.0
|
19
21
|
Requires-Dist: charset-normalizer>=3.4.1
|
20
22
|
Requires-Dist: click>=8.1.8
|
21
23
|
Requires-Dist: cryptography>=44.0.2
|
22
24
|
Requires-Dist: Deprecated>=1.2.18
|
25
|
+
Requires-Dist: distlib>=0.3.9
|
23
26
|
Requires-Dist: docutils>=0.21.2
|
24
27
|
Requires-Dist: fastapi>=0.115.12
|
28
|
+
Requires-Dist: filelock>=3.18.0
|
25
29
|
Requires-Dist: google-api-core>=2.24.2
|
26
30
|
Requires-Dist: google-auth>=2.39.0
|
27
31
|
Requires-Dist: google-cloud-appengine-logging>=1.6.1
|
@@ -43,6 +47,7 @@ Requires-Dist: h11>=0.14.0
|
|
43
47
|
Requires-Dist: httpcore>=1.0.8
|
44
48
|
Requires-Dist: httpx>=0.28.1
|
45
49
|
Requires-Dist: id>=1.5.0
|
50
|
+
Requires-Dist: identify>=2.6.12
|
46
51
|
Requires-Dist: idna>=3.10
|
47
52
|
Requires-Dist: importlib_metadata>=8.6.1
|
48
53
|
Requires-Dist: jaraco.classes>=3.4.0
|
@@ -53,11 +58,17 @@ Requires-Dist: keyring>=25.6.0
|
|
53
58
|
Requires-Dist: markdown-it-py>=3.0.0
|
54
59
|
Requires-Dist: mdurl>=0.1.2
|
55
60
|
Requires-Dist: more-itertools>=10.6.0
|
61
|
+
Requires-Dist: mypy_extensions>=1.1.0
|
56
62
|
Requires-Dist: nh3>=0.2.21
|
63
|
+
Requires-Dist: nodeenv>=1.9.1
|
57
64
|
Requires-Dist: opentelemetry-api>=1.34.1
|
58
65
|
Requires-Dist: opentelemetry-sdk>=1.34.1
|
59
66
|
Requires-Dist: opentelemetry-semantic-conventions>=0.55b1
|
60
67
|
Requires-Dist: packaging>=24.2
|
68
|
+
Requires-Dist: pathspec>=0.11.1
|
69
|
+
Requires-Dist: platformdirs>=4.3.0
|
70
|
+
Requires-Dist: pluggy>=1.6.0
|
71
|
+
Requires-Dist: pre_commit>=4.2.0
|
61
72
|
Requires-Dist: proto-plus>=1.26.1
|
62
73
|
Requires-Dist: protobuf>=5.29.4
|
63
74
|
Requires-Dist: pyasn1>=0.6.1
|
@@ -79,6 +90,7 @@ Requires-Dist: requests-toolbelt>=1.0.0
|
|
79
90
|
Requires-Dist: rfc3986>=2.0.0
|
80
91
|
Requires-Dist: rich>=14.0.0
|
81
92
|
Requires-Dist: rsa>=4.9.1
|
93
|
+
Requires-Dist: ruff>=0.12.2
|
82
94
|
Requires-Dist: SecretStorage>=3.3.3
|
83
95
|
Requires-Dist: sniffio>=1.3.1
|
84
96
|
Requires-Dist: SQLAlchemy>=2.0.40
|
@@ -88,6 +100,7 @@ Requires-Dist: typing-inspection>=0.4.0
|
|
88
100
|
Requires-Dist: typing_extensions>=4.13.2
|
89
101
|
Requires-Dist: urllib3>=2.4.0
|
90
102
|
Requires-Dist: uvicorn>=0.34.2
|
103
|
+
Requires-Dist: virtualenv>=20.31.2
|
91
104
|
Requires-Dist: wrapt>=1.17.2
|
92
105
|
Requires-Dist: zipp>=3.21.0
|
93
106
|
|
@@ -0,0 +1,137 @@
|
|
1
|
+
maleo_foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
maleo_foundation/authentication.py,sha256=Fo4DYLXOqX3sd-m8Eu0oVeuGN0YYLC8xlneGJClQ5Oc,2725
|
3
|
+
maleo_foundation/authorization.py,sha256=8P1hleBYRv8kda4uQcbHVujHVAlI92YV1Flfzf-oJEU,285
|
4
|
+
maleo_foundation/constants.py,sha256=cgW2TjXYEdQRoYCL3fMk3r5B2Yr-Av67CaEAdY5SZ6o,1529
|
5
|
+
maleo_foundation/enums.py,sha256=z_17fthuptSnVRrC6dOdS7NFm2QdVTyIlPeSrXmZBpc,4818
|
6
|
+
maleo_foundation/extended_types.py,sha256=oOAYc5f89WcPt5OWEaNdeceENHiPVr4KDhdttg6bA_w,305
|
7
|
+
maleo_foundation/rest_controller_result.py,sha256=uZxBxZ5hB98q1B4hNyRigHcO0560NYfUjq8L662aOPw,2172
|
8
|
+
maleo_foundation/types.py,sha256=Tq50KOISbnsMslVGBCqlY77lRAQZa-UUFDGqqwRglow,2466
|
9
|
+
maleo_foundation/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
+
maleo_foundation/client/manager.py,sha256=5Ww2CNbKOT4nifI8roO77xlBrxIKCTCUEJHCNbRjGX4,2729
|
11
|
+
maleo_foundation/client/services/__init__.py,sha256=srDKoa3zRt-PvfHcXlFJbwagT0O3wwicL3qbMb3Odug,1104
|
12
|
+
maleo_foundation/client/services/key.py,sha256=YYKgVARQiznJ6Cs1xXRYBA-jSrcBP-w1lKKo0xOqrq4,5976
|
13
|
+
maleo_foundation/client/services/signature.py,sha256=_xXtSk2y0fX4ilhGoVH8Q3nS2dxVBep2EIZXrJgBZoc,5121
|
14
|
+
maleo_foundation/client/services/token.py,sha256=mYxaZKxei2plhkpoKm5QWNRO0instWuoXkrnnoD4lRo,4825
|
15
|
+
maleo_foundation/client/services/encryption/__init__.py,sha256=-rnOE-p0B9vEpBHBuMG3jzfZAwH6_GYNx6_ctQOBHCQ,644
|
16
|
+
maleo_foundation/client/services/encryption/aes.py,sha256=nIMognacAIqFStwa_HcLvmtb-8YaaXmJkeNMwB0BFIc,3898
|
17
|
+
maleo_foundation/client/services/encryption/rsa.py,sha256=JRWh5bfQG3Ry2ViEIXdbaXa_JopWtAOJg_HpanzOZdQ,5383
|
18
|
+
maleo_foundation/client/services/hash/__init__.py,sha256=W4O-Novao01fqy_rTDOC6TQS7-l-wSQUyGCkn49JqvY,830
|
19
|
+
maleo_foundation/client/services/hash/bcrypt.py,sha256=x5qcWhkwexOURVyepHHbHr2Ttd5Q86yHRyDyKmkZr4E,2204
|
20
|
+
maleo_foundation/client/services/hash/hmac.py,sha256=zw0hVXLnxNLR_bAJhX8Lu6JIADw1zp3pzd_-dhHBsKU,2348
|
21
|
+
maleo_foundation/client/services/hash/sha256.py,sha256=MhgyTX--VyQote7eLxQnn80tguCR2u4O2LGdSs3cyQ4,2130
|
22
|
+
maleo_foundation/expanded_types/__init__.py,sha256=5GYECG5mEaH7p3kTH0CH8LUDnIW5URm9do-FYe0QtnU,297
|
23
|
+
maleo_foundation/expanded_types/client.py,sha256=mcFGAECXp4jIzG1P_831MRBa4F3RYnZ2JaIHZHXw-jU,2375
|
24
|
+
maleo_foundation/expanded_types/general.py,sha256=Yo86OCtqzvaMcQuNL4uE3SSRlAiABXZ4Vurf85SCBi4,1476
|
25
|
+
maleo_foundation/expanded_types/hash.py,sha256=08J30Uxp3ncTYMJKy51120qVVXzKIL3W-cFrdZwOR98,423
|
26
|
+
maleo_foundation/expanded_types/key.py,sha256=kfHrmHx6b8DSXlYcFQzmz_Ir1BKlBSCRFxjp9uHwFqc,581
|
27
|
+
maleo_foundation/expanded_types/service.py,sha256=SrtuNTdp3-IfraH7jh7ZJo7z2gHnWiUEn22fIpyDIMo,2395
|
28
|
+
maleo_foundation/expanded_types/signature.py,sha256=vGLrwUwwKpI_ondmwDN1_lv1yJhk2wATgWrnCpd3BrA,458
|
29
|
+
maleo_foundation/expanded_types/token.py,sha256=0v-LDrXNb8Vyfs7Ss3CvgokxZs1xibtxqYlZ9_YQki0,434
|
30
|
+
maleo_foundation/expanded_types/encryption/__init__.py,sha256=PRhENR9aoqzWPTFieH6EZoOQ0PfKgS284l6aAnVOoMw,305
|
31
|
+
maleo_foundation/expanded_types/encryption/aes.py,sha256=-MhdGWAGy-M1k3i-ZegQ9xZwWsiYy6n0w8Jt43BRCmc,495
|
32
|
+
maleo_foundation/expanded_types/encryption/rsa.py,sha256=LJhZ6mnE4OB1eZnNTg21fv1cQVjXGV6xfA9dHPbPlLQ,495
|
33
|
+
maleo_foundation/managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
+
maleo_foundation/managers/cache.py,sha256=hML8vi2MXO2m2HeqB4eE6Ed4kl1iVXgEfpkB9tixs1Q,277
|
35
|
+
maleo_foundation/managers/configuration.py,sha256=Zc397mT3Qn1Q_gDeuDVKl5YA3bSM-oaOFxXnlRDUzuM,1362
|
36
|
+
maleo_foundation/managers/credential.py,sha256=um1M45deBEzTVfsUcpAtKEp3Rb_dH1qQrr8abkG_GeU,3057
|
37
|
+
maleo_foundation/managers/db.py,sha256=y0rQIg-vohhFUtck3v1LCdXov7XYjy9PFiCsVtcg8VI,6496
|
38
|
+
maleo_foundation/managers/middleware.py,sha256=Uglwt4X3MauKtBvbPTyHl0-32od3IN6AYYUtiUCoV9I,2464
|
39
|
+
maleo_foundation/managers/service.py,sha256=GN8batfTPyZUGTVriqi9dZDu601_TYHJcrPL_VdutvQ,11660
|
40
|
+
maleo_foundation/managers/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
+
maleo_foundation/managers/client/base.py,sha256=iM5xZjLm5VQqqpiYcba-rifW0LgkVd-gRTE6XwdOFqY,4369
|
42
|
+
maleo_foundation/managers/client/maleo.py,sha256=ATZXgP8OGqoF51mxjg21UTuWwQbVte-iY0lJ4liNaog,2648
|
43
|
+
maleo_foundation/managers/client/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
|
+
maleo_foundation/managers/client/google/base.py,sha256=MUxGM3wtzdMkbghMdyQkRQ-AI_pG2qpTxq2n69kMF-A,1544
|
45
|
+
maleo_foundation/managers/client/google/parameter.py,sha256=emBgc1qCQcnETKYvwv35EqARjdO9igD0-F-Xuxx-fyU,1410
|
46
|
+
maleo_foundation/managers/client/google/secret.py,sha256=75q32U-kcTljVb19MZQQ5sOVOnf1HkquyK8nIoyeMrY,5014
|
47
|
+
maleo_foundation/managers/client/google/storage.py,sha256=b3iEeBNwX2Rp5bqh4V-JiKkXmPTe_7xbsr4e4G8CvB4,6391
|
48
|
+
maleo_foundation/managers/client/google/subscription.py,sha256=KLXneM39r8Uzvevir_jL7s9-q4iSakNUkD_I66JGbng,5365
|
49
|
+
maleo_foundation/middlewares/authentication.py,sha256=Foag5Bc4tEiCZtHuCnBAKFq4t4jMoU3ZCrR_MMZRZPc,4167
|
50
|
+
maleo_foundation/middlewares/base.py,sha256=ZXMJTiuDBa6sIbgD_g1MhhlMkszsYkt3Ocl4boPtbEU,16825
|
51
|
+
maleo_foundation/middlewares/cors.py,sha256=1QgRXOcURuEhBYMerclqbECgtAE4CFo0EhB4gJXu8Yg,2294
|
52
|
+
maleo_foundation/models/__init__.py,sha256=OlZXaeOhGXz_FppPm87jIOItnr-r179QhIcOWDOORyQ,248
|
53
|
+
maleo_foundation/models/responses.py,sha256=4uIrW8y6gyBQJ5DZRMWKAJcNdamDMCpgCzizwcBHGhw,6081
|
54
|
+
maleo_foundation/models/table.py,sha256=jMvnEGwvrRvR1sCUGWRzEyaa5o5DThcHJepuIvFSjTM,2094
|
55
|
+
maleo_foundation/models/schemas/__init__.py,sha256=tmjBCyG4uMRjiTbnbhIjZaR8q7zk0_J_CqnRzsSfoBQ,279
|
56
|
+
maleo_foundation/models/schemas/encryption.py,sha256=S86FGlcBhyGxxZ5ObNSHTjSDwBUlUtLOMoCAKd5wE34,687
|
57
|
+
maleo_foundation/models/schemas/general.py,sha256=jxzBsVGsdKKEiM14MfV47dDiAZalUK4RnTlq8S36Qus,4060
|
58
|
+
maleo_foundation/models/schemas/hash.py,sha256=jthDmu_VTBydffPruAIAiR8l0Xs6IrlgTptaP42zr1M,447
|
59
|
+
maleo_foundation/models/schemas/key.py,sha256=LSEDQpaCxavwp5je2O-ZNyOPtrFW_lXDywF9LK-An1w,622
|
60
|
+
maleo_foundation/models/schemas/parameter.py,sha256=OE1hg100lEa2IlGlT2Zz6PJ-OcC-6ZfDzsTOeJvvEig,3907
|
61
|
+
maleo_foundation/models/schemas/result.py,sha256=m98SI0YTfY8kjZLrPtuYa-bw3LuUSkPOpYCVYV84UiI,4227
|
62
|
+
maleo_foundation/models/schemas/signature.py,sha256=h0sa91vnCaivmvlbqOd7RLiCz8qAY8gCzEnm0DOBlSg,649
|
63
|
+
maleo_foundation/models/schemas/token.py,sha256=eh4k9rm_MoaCfGV3Nqa7yFH-PH7Ec6WY4RxHhbF4m5U,591
|
64
|
+
maleo_foundation/models/transfers/__init__.py,sha256=V5kdd8wuXqe78bQ7HG3a8vW3Rkke2wTr6mb5lC0IQJg,301
|
65
|
+
maleo_foundation/models/transfers/general/__init__.py,sha256=e7lZRjpwQ8utt1D3IkuWOVFsnCn64De0SvxdWLSezJ0,170
|
66
|
+
maleo_foundation/models/transfers/general/credentials.py,sha256=t6OhQb3DyGSfBpbqHsiJKzPbOVSEcuBTXqmw6f8H3UY,347
|
67
|
+
maleo_foundation/models/transfers/general/database.py,sha256=VQYnZa8dYrqucSQdzkaPSrzLd4SJnpU8LPytUrWErO0,1245
|
68
|
+
maleo_foundation/models/transfers/general/key.py,sha256=QV_kcxAlnrupBcGQK8tqz9FVYbivxwhgIsrmW7XDdME,845
|
69
|
+
maleo_foundation/models/transfers/general/request.py,sha256=W2aKxo0lQ-kV-4XpQEzxxa-odwLlGfOulh_wQKgcz9o,1920
|
70
|
+
maleo_foundation/models/transfers/general/settings.py,sha256=1QkPq6GP33S5R718be3XBz0BCtApAuxlL-x21EZ2Xmo,1609
|
71
|
+
maleo_foundation/models/transfers/general/signature.py,sha256=TCTIy928EeBBeFLlyQ3_NozpR9FUcWXPQKIYIwyj66k,308
|
72
|
+
maleo_foundation/models/transfers/general/token.py,sha256=Gqcq23ZbBs-wqpdvGU0L_YmZExU5hv9KUQ3vz62L34E,5018
|
73
|
+
maleo_foundation/models/transfers/general/configurations/__init__.py,sha256=hrhVflh3coOvqGrxMZKkX5XDxYAbxjxnsGwJjJqV86s,1540
|
74
|
+
maleo_foundation/models/transfers/general/configurations/database.py,sha256=4j465vki3bCNGogrJLmMmF1uEXc-sUfyhwMeuaR5JyM,706
|
75
|
+
maleo_foundation/models/transfers/general/configurations/middleware.py,sha256=gBm7yv-PYOPcv-u6SXq8cMWfuuo9LwPSXuqoJ4uw9h0,1761
|
76
|
+
maleo_foundation/models/transfers/general/configurations/service.py,sha256=1sDBwJYvO7tlKz9YH7eIkfMPWmUqRkx7aW-EMw8tpBQ,306
|
77
|
+
maleo_foundation/models/transfers/general/configurations/cache/__init__.py,sha256=eCEeFFP4jN9FWFHWLadAnP1NoJH4CJQm7WRnXhmHUh0,264
|
78
|
+
maleo_foundation/models/transfers/general/configurations/cache/redis.py,sha256=CUxuw9JSkw-pB4q97IduBnlINmsO487SpnrznYEf4-g,1220
|
79
|
+
maleo_foundation/models/transfers/general/configurations/client/__init__.py,sha256=1w17i9CH4bSQ40o8rwIew2F_id25XklFqI1YPowcHvQ,356
|
80
|
+
maleo_foundation/models/transfers/general/configurations/client/maleo.py,sha256=aYTNsCAa0Vws1Zkt_6lnYAgJUN7Uo_YI_lAcUIaLiR0,1912
|
81
|
+
maleo_foundation/models/transfers/parameters/__init__.py,sha256=HiV7hPn8rUaN7XeOwC_VugYQ4QQO7kbZ0fsp11GDznQ,355
|
82
|
+
maleo_foundation/models/transfers/parameters/client.py,sha256=2V1XvhSmIDDZL7MFVpD_dR5jWIoydQnFW67n9z6rRMA,4041
|
83
|
+
maleo_foundation/models/transfers/parameters/general.py,sha256=NUFsrrfByN9OX9QLYc2Bn0LpNPoxrKBuZae-IVhOiyo,791
|
84
|
+
maleo_foundation/models/transfers/parameters/key.py,sha256=9GiZfAjP1dZAzD3hpS2C0atSOMwcEjYNNV4ih0ZxBmg,429
|
85
|
+
maleo_foundation/models/transfers/parameters/service.py,sha256=VypwLOh22edU6_Ue0EMmIbRBeVKhuBmXBfV2C8x1_YM,6067
|
86
|
+
maleo_foundation/models/transfers/parameters/signature.py,sha256=vKj1nLg8uBAHhYCqV5Qj1byNwkb1rgUHH6eLtG7N01s,503
|
87
|
+
maleo_foundation/models/transfers/parameters/token.py,sha256=PGJ0UDjoq3YQuaJlCB3Ix15jmhicoBNEsxhM1tqLNz0,621
|
88
|
+
maleo_foundation/models/transfers/parameters/encryption/__init__.py,sha256=XcM57zoDB-oQfDNpVuuJHLwe2mv25n05FKig51WdZcc,324
|
89
|
+
maleo_foundation/models/transfers/parameters/encryption/aes.py,sha256=9aoDQFW2ysDSzaMDopObiPbDjKYwPBoB0CFzYgav8Dc,475
|
90
|
+
maleo_foundation/models/transfers/parameters/encryption/rsa.py,sha256=iHDVyZ5eWz1sOruqUTRaBmlk4hyQ4ILzzSZRmHDe2IM,463
|
91
|
+
maleo_foundation/models/transfers/parameters/hash/__init__.py,sha256=bIOL6oyF67sAbYb9jRgb4oCNcLFhpORPZLnluvxd0aQ,433
|
92
|
+
maleo_foundation/models/transfers/parameters/hash/bcrypt.py,sha256=rSko9w23A7GttUkw4KpDVsIZmw_Mow24vDS7iF6Jpp8,296
|
93
|
+
maleo_foundation/models/transfers/parameters/hash/hmac.py,sha256=igre5TwDXJkUTmWO1Wxk4EEn-9p9j5MDevmNpTQ_CZA,389
|
94
|
+
maleo_foundation/models/transfers/parameters/hash/sha256.py,sha256=E6dEzpsu6KB3gUGdXPalpEof8p-MTmbh7D5m93djjTI,296
|
95
|
+
maleo_foundation/models/transfers/results/__init__.py,sha256=IJ4P9AeL1JqJq64Qt_vZ_RF2f1lla7AXihNiBbdhV7g,243
|
96
|
+
maleo_foundation/models/transfers/results/hash.py,sha256=x_U4mmuAO24PWojxFufgw9CKcGlUmIBv0v4zbwEY61o,670
|
97
|
+
maleo_foundation/models/transfers/results/key.py,sha256=dwEWM_FLubTf4tx3dFbvKJyebxyc5jkyrI_vxixO6cw,981
|
98
|
+
maleo_foundation/models/transfers/results/signature.py,sha256=Wjn5GjWTXWMtmSykAZACvAPT_hfXzmwo8GFAOCwYCMw,728
|
99
|
+
maleo_foundation/models/transfers/results/token.py,sha256=uucgesaw7fRUhvfJnsWpjKEARjsTQ8-HF-maAYKei3Q,659
|
100
|
+
maleo_foundation/models/transfers/results/client/__init__.py,sha256=QVW77FHou7OOABTjiIGdwPhXub46AI3GIM8EGk6ONw4,292
|
101
|
+
maleo_foundation/models/transfers/results/client/service.py,sha256=_Eu12Zjr7vwjRoCBRkUEHCS0DEeMZtq4vLwGmBGo5tc,1234
|
102
|
+
maleo_foundation/models/transfers/results/client/controllers/__init__.py,sha256=DN3va_Mcxjw0l1s9dSIOy3LkLR1jEERiAohuIA59vpc,175
|
103
|
+
maleo_foundation/models/transfers/results/client/controllers/http.py,sha256=8-FvXt5n9MSutjKSEWE5k70LrC_UGZ2Ri2oCDrEIfYw,1541
|
104
|
+
maleo_foundation/models/transfers/results/encryption/__init__.py,sha256=fq8hH7SHyYgZkYEurnZpj4Plez7Ipy8-8yX60bj-I-w,309
|
105
|
+
maleo_foundation/models/transfers/results/encryption/aes.py,sha256=5aNglJqHT3Ufordl_Bfy9thIXVblMw80xtmLs7KiCXI,877
|
106
|
+
maleo_foundation/models/transfers/results/encryption/rsa.py,sha256=dSIshf386TAF9hfokDmj4XKHsR_MQfQLmft8AF2MTZc,748
|
107
|
+
maleo_foundation/models/transfers/results/service/__init__.py,sha256=J2PANZfFCPIE836hqKLj7a7q9AT5YSPQ0_SlYj3OKP0,295
|
108
|
+
maleo_foundation/models/transfers/results/service/general.py,sha256=3l0YGZf8SD7udVm1EHr9frMD2kuWbGY1D_Eo1wrGS0Q,1514
|
109
|
+
maleo_foundation/models/transfers/results/service/controllers/__init__.py,sha256=rRt93gFqsJloJXzNWS_2chBC3hJoG4WaN84H2B5UPow,177
|
110
|
+
maleo_foundation/models/transfers/results/service/controllers/rest.py,sha256=YRD_D064BGqHUJeFH-ArOPmSNnhJO_gr_AI4gTqh8Y0,951
|
111
|
+
maleo_foundation/utils/__init__.py,sha256=L9J946_ySumzbJoOIbSBkhGz0tcjWPZ2_g76EXyxKkk,393
|
112
|
+
maleo_foundation/utils/cache.py,sha256=PWNef00iA2m0g3boR7JbzrJQIRITf5nKgdCmMs3s6ag,1159
|
113
|
+
maleo_foundation/utils/client.py,sha256=KDkIEqGX6Tw07Z5HHW4HrG8IWUVkErlqnVijXnpWZGQ,2940
|
114
|
+
maleo_foundation/utils/controller.py,sha256=S69NluxjGCB_toAu3JDLi_izE0-x2ARE_7YK3V8T1Q0,7413
|
115
|
+
maleo_foundation/utils/exceptions.py,sha256=qNbmkfOAz_sIfO_sIypzM6ami-PiK1vs98MJJSAxj7g,6611
|
116
|
+
maleo_foundation/utils/extractor.py,sha256=an9bKvwIniVvUCk0fSetUL_8VGBk_MNEtB2pwgkYb4k,2369
|
117
|
+
maleo_foundation/utils/logging.py,sha256=sOQbvrLdlp1Vwx7y14YitzHx4IHh5iYaCt9WvdrapUI,9141
|
118
|
+
maleo_foundation/utils/merger.py,sha256=UGiuH0EUQJu0WlS1xdPUuvnsNknd3k0DODjdiOTiBdI,704
|
119
|
+
maleo_foundation/utils/query.py,sha256=mAoXadZuWx_ic6Z4VQ9K4GZxYgSNzpNS94W6xxqeFyg,8312
|
120
|
+
maleo_foundation/utils/repository.py,sha256=fZqmApZUG9KqwrfURvyAIw_-7Y9EsLngoAoNcjJphtQ,2951
|
121
|
+
maleo_foundation/utils/searcher.py,sha256=rcHa0pPZvLEk2MgI4qeGW-K6vlUy2eWTnwWzzT8yrKA,528
|
122
|
+
maleo_foundation/utils/dependencies/__init__.py,sha256=jJOo4uCTPiEvpgecsl4JEhKzuV85KaNxOd9PiRl-2ic,124
|
123
|
+
maleo_foundation/utils/dependencies/auth.py,sha256=3Z0b-Xi5PAKRKlbv-ZIT46YrQFkjiS7NhSDWZTOWm8I,650
|
124
|
+
maleo_foundation/utils/dependencies/context.py,sha256=pw18j6LZgHdJQVKCvRH71mFZ_li8jP_wIgbtBMLXpxQ,271
|
125
|
+
maleo_foundation/utils/formatter/__init__.py,sha256=qzn45FGoZeArJYmgFpdzKe-jp3yREGSrPfc4a-iZHe4,80
|
126
|
+
maleo_foundation/utils/formatter/case.py,sha256=VsDTkKVZgN5b5O4Q6hkEzIDTf635FHS2BF_eY-NNngQ,1359
|
127
|
+
maleo_foundation/utils/loaders/__init__.py,sha256=aBVS-zCBdb9t4Keh5cFJ4Vqv5lFHthJoHTaGPVjnvnU,284
|
128
|
+
maleo_foundation/utils/loaders/json.py,sha256=pPcDO4SNL6-JBz4oLQYeXQG-qWcb5_adLe0nZjOIiyo,510
|
129
|
+
maleo_foundation/utils/loaders/yaml.py,sha256=lsNxrG30I2ole6zokJxNZXPBjn39mW2a-zYr07FKGtY,505
|
130
|
+
maleo_foundation/utils/loaders/credential/__init__.py,sha256=g-cAxkTE2EtHaG8Tv52azNhK76d6tym5fjJFMQHfRkQ,143
|
131
|
+
maleo_foundation/utils/loaders/credential/google.py,sha256=GCJl-bsKSSxoE_ERAkIzRrRNIbIEeqYOhHwzFuBr0mk,6576
|
132
|
+
maleo_foundation/utils/loaders/key/__init__.py,sha256=RfqIbUxkdlx1xrbzJZPD_JHiRFNFLRuQs8JoUPCGCv4,108
|
133
|
+
maleo_foundation/utils/loaders/key/rsa.py,sha256=UXcP0rr4QVacTsHLNQuU05wcow5CHWz-JW-zsVxlbPs,4121
|
134
|
+
maleo_foundation-0.3.48.dist-info/METADATA,sha256=3HmPB-EGoIYuZMYRdutYNOSzsdgfZD_P3e6Yx9XR8rg,4150
|
135
|
+
maleo_foundation-0.3.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
136
|
+
maleo_foundation-0.3.48.dist-info/top_level.txt,sha256=_iBos3F_bhEOdjOnzeiEYSrCucasc810xXtLBXI8cQc,17
|
137
|
+
maleo_foundation-0.3.48.dist-info/RECORD,,
|
@@ -1,68 +0,0 @@
|
|
1
|
-
from typing import Awaitable, Callable, Union
|
2
|
-
from maleo_foundation.models.transfers.parameters.general \
|
3
|
-
import BaseGeneralParametersTransfers
|
4
|
-
from maleo_foundation.models.transfers.parameters.service \
|
5
|
-
import BaseServiceParametersTransfers
|
6
|
-
from maleo_foundation.models.transfers.results.service.repository \
|
7
|
-
import BaseServiceRepositoryResultsTransfers
|
8
|
-
|
9
|
-
class ExpandedRepositoryTypes:
|
10
|
-
#* Unpaginated multiple data
|
11
|
-
GetUnpaginatedMultipleParameter = BaseServiceParametersTransfers.GetUnpaginatedMultiple
|
12
|
-
GetUnpaginatedMultipleResult = Union[
|
13
|
-
BaseServiceRepositoryResultsTransfers.Fail,
|
14
|
-
BaseServiceRepositoryResultsTransfers.NoData,
|
15
|
-
BaseServiceRepositoryResultsTransfers.UnpaginatedMultipleData
|
16
|
-
]
|
17
|
-
SyncGetUnpaginatedMultipleFunction = Callable[
|
18
|
-
[GetUnpaginatedMultipleParameter],
|
19
|
-
GetUnpaginatedMultipleResult
|
20
|
-
]
|
21
|
-
AsyncGetUnpaginatedMultipleFunction = Callable[
|
22
|
-
[GetUnpaginatedMultipleParameter],
|
23
|
-
Awaitable[GetUnpaginatedMultipleResult]
|
24
|
-
]
|
25
|
-
|
26
|
-
#* Paginated multiple data
|
27
|
-
GetPaginatedMultipleParameter = BaseServiceParametersTransfers.GetPaginatedMultiple
|
28
|
-
GetPaginatedMultipleResult = Union[
|
29
|
-
BaseServiceRepositoryResultsTransfers.Fail,
|
30
|
-
BaseServiceRepositoryResultsTransfers.NoData,
|
31
|
-
BaseServiceRepositoryResultsTransfers.PaginatedMultipleData
|
32
|
-
]
|
33
|
-
SyncGetPaginatedMultipleFunction = Callable[
|
34
|
-
[GetPaginatedMultipleParameter],
|
35
|
-
GetPaginatedMultipleResult
|
36
|
-
]
|
37
|
-
AsyncGetPaginatedMultipleFunction = Callable[
|
38
|
-
[GetPaginatedMultipleParameter],
|
39
|
-
Awaitable[GetPaginatedMultipleResult]
|
40
|
-
]
|
41
|
-
|
42
|
-
#* Single data
|
43
|
-
GetSingleParameter = BaseGeneralParametersTransfers.GetSingle
|
44
|
-
GetSingleResult = Union[
|
45
|
-
BaseServiceRepositoryResultsTransfers.Fail,
|
46
|
-
BaseServiceRepositoryResultsTransfers.NoData,
|
47
|
-
BaseServiceRepositoryResultsTransfers.SingleData
|
48
|
-
]
|
49
|
-
SyncGetSingleFunction = Callable[
|
50
|
-
[GetSingleParameter],
|
51
|
-
GetSingleResult
|
52
|
-
]
|
53
|
-
AsyncGetSingleFunction = Callable[
|
54
|
-
[GetSingleParameter],
|
55
|
-
Awaitable[GetSingleResult]
|
56
|
-
]
|
57
|
-
|
58
|
-
#* Create or Update
|
59
|
-
CreateOrUpdateResult = Union[
|
60
|
-
BaseServiceRepositoryResultsTransfers.Fail,
|
61
|
-
BaseServiceRepositoryResultsTransfers.SingleData
|
62
|
-
]
|
63
|
-
|
64
|
-
#* Status update
|
65
|
-
StatusUpdateResult = Union[
|
66
|
-
BaseServiceRepositoryResultsTransfers.Fail,
|
67
|
-
BaseServiceRepositoryResultsTransfers.SingleData
|
68
|
-
]
|
@@ -1,39 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
from pydantic import model_validator
|
3
|
-
from maleo_foundation.models.schemas.result import BaseResultSchemas
|
4
|
-
|
5
|
-
class BaseServiceRepositoryResultsTransfers:
|
6
|
-
class Fail(BaseResultSchemas.Fail): pass
|
7
|
-
|
8
|
-
class NotFound(BaseResultSchemas.NotFound): pass
|
9
|
-
|
10
|
-
class NoData(BaseResultSchemas.NoData): pass
|
11
|
-
|
12
|
-
class SingleData(BaseResultSchemas.SingleData): pass
|
13
|
-
|
14
|
-
class UnpaginatedMultipleData(BaseResultSchemas.UnpaginatedMultipleData): pass
|
15
|
-
|
16
|
-
class PaginatedMultipleData(BaseResultSchemas.PaginatedMultipleData):
|
17
|
-
@model_validator(mode="before")
|
18
|
-
@classmethod
|
19
|
-
def calculate_pagination(cls, values: dict) -> dict:
|
20
|
-
"""Calculates pagination metadata before validation."""
|
21
|
-
total_data = values.get("total_data", 0)
|
22
|
-
data = values.get("data", [])
|
23
|
-
|
24
|
-
#* Get pagination values from inherited SimplePagination
|
25
|
-
page = values.get("page", 1)
|
26
|
-
limit = values.get("limit", 10)
|
27
|
-
|
28
|
-
#* Calculate total pages
|
29
|
-
total_pages = (total_data // limit) + (1 if total_data % limit > 0 else 0)
|
30
|
-
|
31
|
-
#* Assign computed pagination object before validation
|
32
|
-
values["pagination"] = BaseResultSchemas.ExtendedPagination(
|
33
|
-
page=page,
|
34
|
-
limit=limit,
|
35
|
-
data_count=len(data),
|
36
|
-
total_data=total_data,
|
37
|
-
total_pages=total_pages
|
38
|
-
)
|
39
|
-
return values
|