UncountablePythonSDK 0.0.93__py3-none-any.whl → 0.0.95__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 UncountablePythonSDK might be problematic. Click here for more details.
- {UncountablePythonSDK-0.0.93.dist-info → UncountablePythonSDK-0.0.95.dist-info}/METADATA +2 -1
- {UncountablePythonSDK-0.0.93.dist-info → UncountablePythonSDK-0.0.95.dist-info}/RECORD +7 -6
- pkgs/serialization_util/_env_flags.py +3 -0
- pkgs/serialization_util/serialization_helpers.py +4 -1
- uncountable/core/client.py +11 -3
- {UncountablePythonSDK-0.0.93.dist-info → UncountablePythonSDK-0.0.95.dist-info}/WHEEL +0 -0
- {UncountablePythonSDK-0.0.93.dist-info → UncountablePythonSDK-0.0.95.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.95
|
|
4
4
|
Summary: Uncountable SDK
|
|
5
5
|
Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
|
|
@@ -38,6 +38,7 @@ Requires-Dist: simplejson==3.*
|
|
|
38
38
|
Requires-Dist: grpcio==1.67.1
|
|
39
39
|
Requires-Dist: protobuf>=4.21.1
|
|
40
40
|
Requires-Dist: azure-storage-blob==12.*
|
|
41
|
+
Requires-Dist: boto3-stubs[essential,ses]==1.36.4
|
|
41
42
|
Provides-Extra: test
|
|
42
43
|
Requires-Dist: mypy==1.*; extra == "test"
|
|
43
44
|
Requires-Dist: ruff==0.*; extra == "test"
|
|
@@ -51,10 +51,11 @@ pkgs/serialization/serial_generic.py,sha256=vAC0-o9fkco2lM_YvBavY0JDYncDxbW3jFbo
|
|
|
51
51
|
pkgs/serialization/serial_union.py,sha256=IdWsSsM8j-qGfl5Wv6haX37ZS1SKob8XT8cilBBOVIo,2670
|
|
52
52
|
pkgs/serialization/yaml.py,sha256=yoJtu7_ixnJV6uTxA_U1PpK5F_ixT08AKVh5ocyYwXM,1466
|
|
53
53
|
pkgs/serialization_util/__init__.py,sha256=YykkhqGNKiLCo-D5vSTq6WiPNfCyPXyr-mQO5e5Klak,513
|
|
54
|
+
pkgs/serialization_util/_env_flags.py,sha256=5kBchfeYS_MRWWSdUE3EljXTtOZX-YYH7inh48d-Qz8,90
|
|
54
55
|
pkgs/serialization_util/_get_type_for_serialization.py,sha256=dW5_W9MFd6wgWfW5qlWork-GBb-QFLtiOZkjk2Zqn2M,1177
|
|
55
56
|
pkgs/serialization_util/convert_to_snakecase.py,sha256=H2BAo5ZdcCDN77RpLb-uP0s7-FQ5Ukwnsd3VYc1vD0M,583
|
|
56
57
|
pkgs/serialization_util/dataclasses.py,sha256=uhNGXQPQLZblDFQuuwkAGmKOPiRyfDzCdg72CVtYJGA,390
|
|
57
|
-
pkgs/serialization_util/serialization_helpers.py,sha256=
|
|
58
|
+
pkgs/serialization_util/serialization_helpers.py,sha256=gP4U5zLYA6Y3y1qtcH2qoRsXPh-UnhR5ITEIRUDj06A,6649
|
|
58
59
|
pkgs/strenum_compat/__init__.py,sha256=wXRFeNvBm8RU6dy1PFJ5sRLgUIEeH_DVR95Sv5qpGbk,59
|
|
59
60
|
pkgs/strenum_compat/strenum_compat.py,sha256=uOUAgpYTjHs1MX8dG81jRlyTkt3KNbkV_25zp7xTX2s,36
|
|
60
61
|
pkgs/type_spec/__init__.py,sha256=h5DmJTca4QVV10sZR1x0-MlkZfuGYDfapR3zHvXfzto,19
|
|
@@ -87,7 +88,7 @@ uncountable/__init__.py,sha256=8l8XWNCKsu7TG94c-xa2KHpDegvxDC2FyQISdWC763Y,89
|
|
|
87
88
|
uncountable/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
89
|
uncountable/core/__init__.py,sha256=RFv0kO6rKFf1PtBPu83hCGmxqkJamRtsgQ9_-ztw7tA,341
|
|
89
90
|
uncountable/core/async_batch.py,sha256=9pYGFzVCQXt8059qFHgutweGIFPquJ5Xfq6NT5P-1K0,1206
|
|
90
|
-
uncountable/core/client.py,sha256=
|
|
91
|
+
uncountable/core/client.py,sha256=ZlGKzpAnPaU0ABOb_bhIDUKZ9x8rlezqVaK0mfDvdw8,13253
|
|
91
92
|
uncountable/core/environment.py,sha256=6cc-nUvUIbJMI0OSEg3dWI-iNgSYhCdUKKn607Z3QpM,1040
|
|
92
93
|
uncountable/core/file_upload.py,sha256=bgvXk9vfF5qlhy2NAUcEEG7Q7i-c1wr2HrpaWD7HldU,4516
|
|
93
94
|
uncountable/core/types.py,sha256=s2CjqYJpsmbC7xMwxxT7kJ_V9bwokrjjWVVjpMcQpKI,333
|
|
@@ -295,7 +296,7 @@ uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr
|
|
|
295
296
|
uncountable/types/api/triggers/run_trigger.py,sha256=diX1ix_5hkti1F1uYoZhP5iyc6GHAU5coKgqq5syLhI,1059
|
|
296
297
|
uncountable/types/api/uploader/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
|
|
297
298
|
uncountable/types/api/uploader/invoke_uploader.py,sha256=-loZzBihKqx63eP-f5RuV1mu6tgkRTZmIc545kklZLk,1273
|
|
298
|
-
UncountablePythonSDK-0.0.
|
|
299
|
-
UncountablePythonSDK-0.0.
|
|
300
|
-
UncountablePythonSDK-0.0.
|
|
301
|
-
UncountablePythonSDK-0.0.
|
|
299
|
+
UncountablePythonSDK-0.0.95.dist-info/METADATA,sha256=_aARUIB5Kl7b_t54KZ_V2VEDHcexJewGDsVKgoBOm64,2114
|
|
300
|
+
UncountablePythonSDK-0.0.95.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
301
|
+
UncountablePythonSDK-0.0.95.dist-info/top_level.txt,sha256=1UVGjAU-6hJY9qw2iJ7nCBeEwZ793AEN5ZfKX9A1uj4,31
|
|
302
|
+
UncountablePythonSDK-0.0.95.dist-info/RECORD,,
|
|
@@ -23,6 +23,7 @@ from pkgs.serialization import (
|
|
|
23
23
|
get_serial_class_data,
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
from ._env_flags import USE_FASTJSON
|
|
26
27
|
from ._get_type_for_serialization import SerializationType, get_serialization_type
|
|
27
28
|
from .dataclasses import iterate_fields
|
|
28
29
|
|
|
@@ -109,7 +110,9 @@ def _get_dataclass_conversion_lookups(dataclass_type: Any) -> DataclassConversio
|
|
|
109
110
|
if scd.has_to_string_value(key):
|
|
110
111
|
value_conversion_functions[key] = _to_string_value
|
|
111
112
|
elif scd.has_unconverted_value(key):
|
|
112
|
-
value_conversion_functions[key] =
|
|
113
|
+
value_conversion_functions[key] = (
|
|
114
|
+
serialize_for_storage if USE_FASTJSON else identity
|
|
115
|
+
)
|
|
113
116
|
else:
|
|
114
117
|
value_conversion_functions[key] = serialize_for_api
|
|
115
118
|
|
uncountable/core/client.py
CHANGED
|
@@ -197,9 +197,10 @@ class Client(ClientMethods):
|
|
|
197
197
|
logger=self._cfg.logger,
|
|
198
198
|
)
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
@classmethod
|
|
201
|
+
def _validate_response_status(
|
|
202
|
+
cls, response: requests.Response, request_id: str
|
|
203
|
+
) -> None:
|
|
203
204
|
if response.status_code < 200 or response.status_code > 299:
|
|
204
205
|
extra_details: dict[str, JsonValue] | None = None
|
|
205
206
|
try:
|
|
@@ -214,6 +215,11 @@ class Client(ClientMethods):
|
|
|
214
215
|
extra_details=extra_details,
|
|
215
216
|
request_id=request_id,
|
|
216
217
|
)
|
|
218
|
+
|
|
219
|
+
def _get_response_json(
|
|
220
|
+
self, response: requests.Response, request_id: str
|
|
221
|
+
) -> dict[str, JsonValue]:
|
|
222
|
+
self._validate_response_status(response, request_id)
|
|
217
223
|
try:
|
|
218
224
|
return typing.cast(dict[str, JsonValue], response.json())
|
|
219
225
|
except JSONDecodeError as e:
|
|
@@ -361,6 +367,8 @@ class Client(ClientMethods):
|
|
|
361
367
|
assert isinstance(http_request, HTTPGetRequest)
|
|
362
368
|
request.params = http_request.query_params
|
|
363
369
|
response = self._send_request(request)
|
|
370
|
+
self._validate_response_status(response, request_id)
|
|
371
|
+
|
|
364
372
|
content = response.content
|
|
365
373
|
content_disposition = response.headers.get("Content-Disposition", None)
|
|
366
374
|
return [
|
|
File without changes
|
{UncountablePythonSDK-0.0.93.dist-info → UncountablePythonSDK-0.0.95.dist-info}/top_level.txt
RENAMED
|
File without changes
|