ul-api-utils 8.1.13__py3-none-any.whl → 8.1.15__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.

Potentially problematic release.


This version of ul-api-utils might be problematic. Click here for more details.

@@ -5,7 +5,7 @@ from typing import TypeVar, Generic, List, Optional, Dict, Any, Callable, Union,
5
5
 
6
6
  import msgpack
7
7
  from flask import jsonify, send_file, redirect, Response, request
8
- from pydantic import BaseModel
8
+ from pydantic import BaseModel, Field
9
9
  from pydantic import ConfigDict, RootModel
10
10
  from werkzeug import Response as BaseResponse
11
11
 
@@ -211,7 +211,7 @@ class RootJsonApiResponse(Generic[TJsonObjApiResponsePayload], EmptyJsonApiRespo
211
211
 
212
212
 
213
213
  class AnyJsonApiResponse(ApiResponse):
214
- payload: TPayloadInputUnion
214
+ payload: TPayloadInputUnion = Field(union_mode="left_to_right")
215
215
  total_count: Optional[int] = None
216
216
  errors: List[Dict[str, Any]] = []
217
217
 
@@ -1,12 +1,9 @@
1
- from typing import Union, Dict, Any, Tuple, Optional, TypeVar, TypeAlias
1
+ from typing import Union, Dict, Any, Tuple, Optional, Iterable
2
2
 
3
3
  from pydantic import BaseModel
4
4
  from ul_db_utils.model.base_model import BaseModel as DbBaseModel
5
5
  from flask_sqlalchemy import Model
6
6
 
7
- T = TypeVar("T")
8
- Iterable: TypeAlias = Union[set[T], tuple[T, ...], list[T]]
9
-
10
-
11
- TDictable = Union[Dict[str, Any], BaseModel, Tuple[Any, ...], DbBaseModel, Model] # TODO: remove DbBaseModel/Model from it BECAUSE IT loads sqlalchemy (>20mb of code)
7
+ # TODO: remove DbBaseModel/Model from it BECAUSE IT loads sqlalchemy (>20mb of code)
8
+ TDictable = Union[Dict[str, Any], BaseModel, Tuple[Any, ...], DbBaseModel, Model]
12
9
  TPayloadInputUnion = Union[Optional[TDictable], Iterable[TDictable]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ul-api-utils
3
- Version: 8.1.13
3
+ Version: 8.1.15
4
4
  Summary: Python api utils
5
5
  Author: Unic-lab
6
6
  Author-email:
@@ -31,10 +31,10 @@ ul_api_utils/api_resource/api_resource_config.py,sha256=l9OYJy75UZLshOkEQDO5jlhX
31
31
  ul_api_utils/api_resource/api_resource_error_handling.py,sha256=E0SWpjFSIP-4SumbgzrHtFuFiGe9q38WsvLROt0YcPE,1168
32
32
  ul_api_utils/api_resource/api_resource_fn_typing.py,sha256=o-S6ep9fhSgZzQCv1lbpEojVLWcpFwaGP1CiS7GcFlk,19063
33
33
  ul_api_utils/api_resource/api_resource_type.py,sha256=mgjSQI3swGpgpLI6y35LYtFrdN-kXyV5cQorwGW7h6g,462
34
- ul_api_utils/api_resource/api_response.py,sha256=QXR_vqHFBIOiHYTbSZGaDbA57Etdjd2UUtFtU3-ml4U,10026
34
+ ul_api_utils/api_resource/api_response.py,sha256=bfnWo5GZUCzwJm8rDfzcpuYL4l63pBedJ0tTguP--qw,10069
35
35
  ul_api_utils/api_resource/api_response_db.py,sha256=ucY6ANPlHZml7JAbvq-PL85z0bvERTjEJKvz-REPyok,888
36
36
  ul_api_utils/api_resource/api_response_payload_alias.py,sha256=FoD0LhQGZ2T8A5-VKRX5ADyzSgm7_dd3qxU2BgCVXkA,587
37
- ul_api_utils/api_resource/db_types.py,sha256=9x66sCVENZ3pkBWOg39YqKCcpRL0jqyp9r9laAhprvI,523
37
+ ul_api_utils/api_resource/db_types.py,sha256=gF0oxisRkYLf7_2e7YEU-HJDxLy3dJCVaJsYQbOfG5k,433
38
38
  ul_api_utils/api_resource/signature_check.py,sha256=jahhr7ttYEUKen_Wp2Eh1__oxqu7ZDoYgw0diK9CFzc,1266
39
39
  ul_api_utils/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  ul_api_utils/commands/cmd_enc_keys.py,sha256=HvwihTrLMqhQO_nYA8U0oowqrTKsmUGzseRofuSCO9k,8488
@@ -148,9 +148,9 @@ ul_api_utils/validators/validate_empty_object.py,sha256=3Ck_iwyJE_M5e7l6s1i88aqb
148
148
  ul_api_utils/validators/validate_uuid.py,sha256=EfvlRirv2EW0Z6w3s8E8rUa9GaI8qXZkBWhnPs8NFrA,257
149
149
  ul_api_utils/validators/__tests__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
150
  ul_api_utils/validators/__tests__/test_custom_fields.py,sha256=20gLlnm1Ithsbbz3NIUXVAd92lW6YwVRSg_nETZhfaI,1442
151
- ul_api_utils-8.1.13.dist-info/LICENSE,sha256=6Qo8OdcqI8aGrswJKJYhST-bYqxVQBQ3ujKdTSdq-80,1062
152
- ul_api_utils-8.1.13.dist-info/METADATA,sha256=kwD0jIwhiyQKnl_6x96OQ6AP58-x5OA_b0LZ0QC0JB0,14748
153
- ul_api_utils-8.1.13.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
154
- ul_api_utils-8.1.13.dist-info/entry_points.txt,sha256=8tL3ySHWTyJMuV1hx1fHfN8zumDVOCOm63w3StphkXg,53
155
- ul_api_utils-8.1.13.dist-info/top_level.txt,sha256=1XsW8iOSFaH4LOzDcnNyxHpHrbKU3fSn-aIAxe04jmw,21
156
- ul_api_utils-8.1.13.dist-info/RECORD,,
151
+ ul_api_utils-8.1.15.dist-info/LICENSE,sha256=6Qo8OdcqI8aGrswJKJYhST-bYqxVQBQ3ujKdTSdq-80,1062
152
+ ul_api_utils-8.1.15.dist-info/METADATA,sha256=mAIviviZmrgWEmncAT-XDulp1mXdHoH28yIeHlcoPkw,14748
153
+ ul_api_utils-8.1.15.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
154
+ ul_api_utils-8.1.15.dist-info/entry_points.txt,sha256=8tL3ySHWTyJMuV1hx1fHfN8zumDVOCOm63w3StphkXg,53
155
+ ul_api_utils-8.1.15.dist-info/top_level.txt,sha256=1XsW8iOSFaH4LOzDcnNyxHpHrbKU3fSn-aIAxe04jmw,21
156
+ ul_api_utils-8.1.15.dist-info/RECORD,,