deeporigin-data-sdk 0.1.0a53__py3-none-any.whl → 0.1.0a54__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.
@@ -142,6 +142,10 @@ def _maybe_transform_key(key: str, type_: type) -> str:
142
142
  return key
143
143
 
144
144
 
145
+ def _no_transform_needed(annotation: type) -> bool:
146
+ return annotation == float or annotation == int
147
+
148
+
145
149
  def _transform_recursive(
146
150
  data: object,
147
151
  *,
@@ -184,6 +188,15 @@ def _transform_recursive(
184
188
  return cast(object, data)
185
189
 
186
190
  inner_type = extract_type_arg(stripped_type, 0)
191
+ if _no_transform_needed(inner_type):
192
+ # for some types there is no need to transform anything, so we can get a small
193
+ # perf boost from skipping that work.
194
+ #
195
+ # but we still need to convert to a list to ensure the data is json-serializable
196
+ if is_list(data):
197
+ return data
198
+ return list(data)
199
+
187
200
  return [_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
188
201
 
189
202
  if is_union_type(stripped_type):
@@ -332,6 +345,15 @@ async def _async_transform_recursive(
332
345
  return cast(object, data)
333
346
 
334
347
  inner_type = extract_type_arg(stripped_type, 0)
348
+ if _no_transform_needed(inner_type):
349
+ # for some types there is no need to transform anything, so we can get a small
350
+ # perf boost from skipping that work.
351
+ #
352
+ # but we still need to convert to a list to ensure the data is json-serializable
353
+ if is_list(data):
354
+ return data
355
+ return list(data)
356
+
335
357
  return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
336
358
 
337
359
  if is_union_type(stripped_type):
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "deeporigin_data"
4
- __version__ = "0.1.0-alpha.53" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.54" # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: deeporigin_data_sdk
3
- Version: 0.1.0a53
3
+ Version: 0.1.0a54
4
4
  Summary: The official Python library for the deeporigin_data API
5
5
  Project-URL: Homepage, https://github.com/deeporiginbio/deeporigin-data-sdk
6
6
  Project-URL: Repository, https://github.com/deeporiginbio/deeporigin-data-sdk
@@ -11,7 +11,7 @@ deeporigin_data/_resource.py,sha256=tkm4gF9YRotE93j48jTDBSGs8wyVa0E5NS9fj19e38c,
11
11
  deeporigin_data/_response.py,sha256=aA9Ff3JrsFz4-PRMh4eMTY-t_IiFXI9_uWDP4CcmRps,28871
12
12
  deeporigin_data/_streaming.py,sha256=yG857cOSJD3gbc7mEc2wqfvcPVLMGmYX4hBOqqIT5RE,10132
13
13
  deeporigin_data/_types.py,sha256=HI5vtFJGLEsyOrrWJRSRtUeOSrd8EdoM020wC51GvcI,6152
14
- deeporigin_data/_version.py,sha256=l9coiItI1SThDZsgWAXDsNkG8EWFUpJ4lxHgg0R_620,176
14
+ deeporigin_data/_version.py,sha256=ieWBuvtX4a9UXgux5J_q8irSYxqbzIfmDdcYcwvKIHc,176
15
15
  deeporigin_data/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  deeporigin_data/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  deeporigin_data/_utils/_logs.py,sha256=R7dnUaDs2cdYbq1Ee16dHy863wdcTZRRzubw9KE0qNc,801
@@ -19,7 +19,7 @@ deeporigin_data/_utils/_proxy.py,sha256=z3zsateHtb0EARTWKk8QZNHfPkqJbqwd1lM993LB
19
19
  deeporigin_data/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
20
20
  deeporigin_data/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
21
21
  deeporigin_data/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
22
- deeporigin_data/_utils/_transform.py,sha256=asrbdx4Pf5NupzaB8QdEjypW_DgHjjkpswHT0Jum4S0,13987
22
+ deeporigin_data/_utils/_transform.py,sha256=xfcRTFidCyPhQ7hXeivxpAS0x-NhTyr20iXm1cKcJYk,14857
23
23
  deeporigin_data/_utils/_typing.py,sha256=nTJz0jcrQbEgxwy4TtAkNxuU0QHHlmc6mQtA6vIR8tg,4501
24
24
  deeporigin_data/_utils/_utils.py,sha256=8UmbPOy_AAr2uUjjFui-VZSrVBHRj6bfNEKRp5YZP2A,12004
25
25
  deeporigin_data/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
@@ -120,7 +120,7 @@ deeporigin_data/types/shared_params/add_column_base.py,sha256=s8cbOjluJmf4Pzmg_v
120
120
  deeporigin_data/types/shared_params/add_column_union.py,sha256=uEJwB-xtbKY19Hq7a2vIrGdDfPcHIBwp9_R63Qf9KO0,1036
121
121
  deeporigin_data/types/shared_params/condition.py,sha256=38ItZ9QZrA3rnXNgds7KZcXCZ-h1zVttiD1R6uf5IGQ,3153
122
122
  deeporigin_data/types/shared_params/row_filter_join.py,sha256=QIo2yhjJJZLcGF-hBF7YcLcYHLhf5uq5EkQG-0WJjtU,595
123
- deeporigin_data_sdk-0.1.0a53.dist-info/METADATA,sha256=p-TENrFN6U5TwYT2D8xSeKl5xh--0qjuTRAR8ZLLRo0,13775
124
- deeporigin_data_sdk-0.1.0a53.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
125
- deeporigin_data_sdk-0.1.0a53.dist-info/licenses/LICENSE,sha256=jT1To9IZ3XdRqtpv8wDrIwpatTUvf5yP0sFYhEtJVZY,11345
126
- deeporigin_data_sdk-0.1.0a53.dist-info/RECORD,,
123
+ deeporigin_data_sdk-0.1.0a54.dist-info/METADATA,sha256=DIJ5_MlboMOnv_YmpvFR6xgWV_-DUpALBthlxQfTy-w,13775
124
+ deeporigin_data_sdk-0.1.0a54.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
125
+ deeporigin_data_sdk-0.1.0a54.dist-info/licenses/LICENSE,sha256=jT1To9IZ3XdRqtpv8wDrIwpatTUvf5yP0sFYhEtJVZY,11345
126
+ deeporigin_data_sdk-0.1.0a54.dist-info/RECORD,,