supervisely 6.73.249__py3-none-any.whl → 6.73.250__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 supervisely might be problematic. Click here for more details.

supervisely/api/api.py CHANGED
@@ -1011,6 +1011,7 @@ class Api:
1011
1011
  headers: Optional[Dict[str, str]] = None,
1012
1012
  retries: Optional[int] = None,
1013
1013
  raise_error: Optional[bool] = False,
1014
+ timeout: httpx._types.TimeoutTypes = 60,
1014
1015
  ) -> httpx.Response:
1015
1016
  """
1016
1017
  Performs POST request to server with given parameters using httpx.
@@ -1031,6 +1032,8 @@ class Api:
1031
1032
  :type retries: int, optional
1032
1033
  :param raise_error: Define, if you'd like to raise error if connection is failed.
1033
1034
  :type raise_error: bool, optional
1035
+ :param timeout: Overall timeout for the request.
1036
+ :type timeout: float, optional
1034
1037
  :return: Response object
1035
1038
  :rtype: :class:`httpx.Response`
1036
1039
  """
@@ -1057,6 +1060,7 @@ class Api:
1057
1060
  json=json,
1058
1061
  params=params,
1059
1062
  headers=headers,
1063
+ timeout=timeout,
1060
1064
  )
1061
1065
  if response.status_code != httpx.codes.OK:
1062
1066
  self._check_version()
@@ -1098,6 +1102,7 @@ class Api:
1098
1102
  params: httpx._types.QueryParamTypes,
1099
1103
  retries: Optional[int] = None,
1100
1104
  use_public_api: Optional[bool] = True,
1105
+ timeout: httpx._types.TimeoutTypes = 60,
1101
1106
  ) -> httpx.Response:
1102
1107
  """
1103
1108
  Performs GET request to server with given parameters.
@@ -1110,6 +1115,8 @@ class Api:
1110
1115
  :type retries: int, optional
1111
1116
  :param use_public_api: Define if public API should be used. Default is True.
1112
1117
  :type use_public_api: bool, optional
1118
+ :param timeout: Overall timeout for the request.
1119
+ :type timeout: float, optional
1113
1120
  :return: Response object
1114
1121
  :rtype: :class:`Response<Response>`
1115
1122
  """
@@ -1131,7 +1138,12 @@ class Api:
1131
1138
  for retry_idx in range(retries):
1132
1139
  response = None
1133
1140
  try:
1134
- response = self.httpx_client.get(url, params=request_params, headers=self.headers)
1141
+ response = self.httpx_client.get(
1142
+ url,
1143
+ params=request_params,
1144
+ headers=self.headers,
1145
+ timeout=timeout,
1146
+ )
1135
1147
  if response.status_code != httpx.codes.OK:
1136
1148
  Api._raise_for_status_httpx(response)
1137
1149
  return response
@@ -1170,7 +1182,7 @@ class Api:
1170
1182
  raise_error: Optional[bool] = False,
1171
1183
  chunk_size: int = 8192,
1172
1184
  use_public_api: Optional[bool] = True,
1173
- timeout: httpx._types.TimeoutTypes = 15,
1185
+ timeout: httpx._types.TimeoutTypes = 60,
1174
1186
  ) -> Generator:
1175
1187
  """
1176
1188
  Performs streaming GET or POST request to server with given parameters.
@@ -1325,6 +1337,7 @@ class Api:
1325
1337
  headers: Optional[Dict[str, str]] = None,
1326
1338
  retries: Optional[int] = None,
1327
1339
  raise_error: Optional[bool] = False,
1340
+ timeout: httpx._types.TimeoutTypes = 60,
1328
1341
  ) -> httpx.Response:
1329
1342
  """
1330
1343
  Performs POST request to server with given parameters using httpx.
@@ -1345,6 +1358,8 @@ class Api:
1345
1358
  :type retries: int, optional
1346
1359
  :param raise_error: Define, if you'd like to raise error if connection is failed.
1347
1360
  :type raise_error: bool, optional
1361
+ :param timeout: Overall timeout for the request.
1362
+ :type timeout: float, optional
1348
1363
  :return: Response object
1349
1364
  :rtype: :class:`httpx.Response`
1350
1365
  """
@@ -1371,6 +1386,7 @@ class Api:
1371
1386
  json=json,
1372
1387
  params=params,
1373
1388
  headers=headers,
1389
+ timeout=timeout,
1374
1390
  )
1375
1391
  if response.status_code != httpx.codes.OK:
1376
1392
  self._check_version()
@@ -1417,7 +1433,7 @@ class Api:
1417
1433
  range_end: Optional[int] = None,
1418
1434
  chunk_size: int = 8192,
1419
1435
  use_public_api: Optional[bool] = True,
1420
- timeout: httpx._types.TimeoutTypes = 15,
1436
+ timeout: httpx._types.TimeoutTypes = 60,
1421
1437
  ) -> AsyncGenerator:
1422
1438
  """
1423
1439
  Performs asynchronous streaming GET or POST request to server with given parameters.
@@ -4605,6 +4605,9 @@ async def _download_project_item_async(
4605
4605
  Uses parameters from the parent function _download_project_async.
4606
4606
  """
4607
4607
  if save_images:
4608
+ logger.debug(
4609
+ f"Downloading 1 image in single mode: {img_info.name} with _download_project_item_async"
4610
+ )
4608
4611
  img_bytes = await api.image.download_bytes_single_async(
4609
4612
  img_info.id, semaphore=semaphore, check_hash=True
4610
4613
  )
@@ -4667,6 +4670,9 @@ async def _download_project_items_batch_async(
4667
4670
  img_ids = [img_info.id for img_info in img_infos]
4668
4671
  imgs_bytes = [None] * len(img_ids)
4669
4672
  temp_dict = {}
4673
+ logger.debug(
4674
+ f"Downloading {len(img_ids)} images in bulk with _download_project_items_batch_async"
4675
+ )
4670
4676
  async for img_id, img_bytes in api.image.download_bytes_generator_async(
4671
4677
  dataset_id,
4672
4678
  img_ids,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.249
3
+ Version: 6.73.250
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -22,7 +22,7 @@ supervisely/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  supervisely/api/advanced_api.py,sha256=Nd5cCnHFWc3PSUrCtENxTGtDjS37_lCHXsgXvUI3Ti8,2054
23
23
  supervisely/api/agent_api.py,sha256=ShWAIlXcWXcyI9fqVuP5GZVCigCMJmjnvdGUfLspD6Y,8890
24
24
  supervisely/api/annotation_api.py,sha256=kB9l0NhQEkunGDC9fWjNzf5DdhqRF1tv-RRnIbkV2k0,64941
25
- supervisely/api/api.py,sha256=aSFD2Q05q0CK9nmMyFTEv5pHKyTm_ysu9cagwt4GDhs,64746
25
+ supervisely/api/api.py,sha256=A4EY7MtLWw4a29Wd63SjQs2CkS3KAiYkVLyuuZn1LdM,65371
26
26
  supervisely/api/app_api.py,sha256=-T4sISQ7POyR2yirf1kEWj4JaJFpJxCyRWqbf_99Jak,67036
27
27
  supervisely/api/dataset_api.py,sha256=2-SQBlgEnIN-0uvDbtPlSXr6ztBeZ3WPryhkOtpBmk4,40786
28
28
  supervisely/api/file_api.py,sha256=c4iIzH2BF8-GLFLk_wc9Qz225AbHhbzH22wv5HdsGg4,83128
@@ -979,7 +979,7 @@ supervisely/project/data_version.py,sha256=nknaWJSUCwoDyNG9_d1KA-GjzidhV9zd9Cn8c
979
979
  supervisely/project/download.py,sha256=zb8sb4XZ6Qi3CP7fmtLRUAYzaxs_W0WnOfe2x3ZVRMs,24639
980
980
  supervisely/project/pointcloud_episode_project.py,sha256=fcaFAaHVn_VvdiIfHl4IyEFE5-Q3VFGfo7_YoxEma0I,41341
981
981
  supervisely/project/pointcloud_project.py,sha256=Y8Xhi6Hg-KyztwFncezuDfKTt2FILss96EU_LdXzmrA,49172
982
- supervisely/project/project.py,sha256=UY7nLGRNcUO6nDvBlirsUg0mbX6XW7_tXoqGaofojqo,188125
982
+ supervisely/project/project.py,sha256=Bnp-LHrlQCxOWV7SVbpEcDKdFO9VMKiAgod6Fld8p-E,188388
983
983
  supervisely/project/project_meta.py,sha256=26s8IiHC5Pg8B1AQi6_CrsWteioJP2in00cRNe8QlW0,51423
984
984
  supervisely/project/project_settings.py,sha256=NLThzU_DCynOK6hkHhVdFyezwprn9UqlnrLDe_3qhkY,9347
985
985
  supervisely/project/project_type.py,sha256=_3RqW2CnDBKFOvSIrQT1RJQaiHirs34_jiQS8CkwCpo,530
@@ -1041,9 +1041,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1041
1041
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1042
1042
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1043
1043
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1044
- supervisely-6.73.249.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1045
- supervisely-6.73.249.dist-info/METADATA,sha256=FBoF2tXmhzf_EnSJp7NDXFSo33Wo4Tu-oTMHcdxBA94,33351
1046
- supervisely-6.73.249.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1047
- supervisely-6.73.249.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1048
- supervisely-6.73.249.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1049
- supervisely-6.73.249.dist-info/RECORD,,
1044
+ supervisely-6.73.250.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1045
+ supervisely-6.73.250.dist-info/METADATA,sha256=j3RVqFtC97ky9SHc1RUfxOgYOsbjiW4Fw2SAtAcI_6s,33351
1046
+ supervisely-6.73.250.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1047
+ supervisely-6.73.250.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1048
+ supervisely-6.73.250.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1049
+ supervisely-6.73.250.dist-info/RECORD,,