supervisely 6.73.405__py3-none-any.whl → 6.73.406__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.
supervisely/__init__.py CHANGED
@@ -315,4 +315,4 @@ except Exception as e:
315
315
  # If new changes in Supervisely Python SDK require upgrade of the Supervisely instance
316
316
  # set a new value for the environment variable MINIMUM_INSTANCE_VERSION_FOR_SDK, otherwise
317
317
  # users can face compatibility issues, if the instance version is lower than the SDK version.
318
- os.environ["MINIMUM_INSTANCE_VERSION_FOR_SDK"] = "6.13.00"
318
+ os.environ["MINIMUM_INSTANCE_VERSION_FOR_SDK"] = "6.14.00"
@@ -691,6 +691,10 @@ class ApiField:
691
691
  """"""
692
692
  UPDATE_STRATEGY = "updateStrategy"
693
693
  """"""
694
+ LOCAL_ENTITIES_COUNT = "localEntitiesCount"
695
+ """"""
696
+ REMOTE_ENTITIES_COUNT = "remoteEntitiesCount"
697
+ """"""
694
698
 
695
699
 
696
700
  def _get_single_item(items):
@@ -100,6 +100,8 @@ class ProjectInfo(NamedTuple):
100
100
  embeddings_enabled: Optional[bool] = None
101
101
  embeddings_updated_at: Optional[str] = None
102
102
  embeddings_in_progress: Optional[bool] = None
103
+ local_entities_count: Optional[int] = None
104
+ remote_entities_count: Optional[int] = None
103
105
 
104
106
  @property
105
107
  def image_preview_url(self):
@@ -177,6 +179,12 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
177
179
  team_id=2,
178
180
  import_settings={}
179
181
  version={'id': 260, 'version': 3}
182
+ created_by_id=7,
183
+ embeddings_enabled=False,
184
+ embeddings_updated_at=None,
185
+ embeddings_in_progress=False,
186
+ local_entities_count=10,
187
+ remote_entities_count=0
180
188
  )
181
189
  """
182
190
  return [
@@ -203,6 +211,8 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
203
211
  ApiField.EMBEDDINGS_ENABLED,
204
212
  ApiField.EMBEDDINGS_UPDATED_AT,
205
213
  ApiField.EMBEDDINGS_IN_PROGRESS,
214
+ ApiField.LOCAL_ENTITIES_COUNT,
215
+ ApiField.REMOTE_ENTITIES_COUNT,
206
216
  ]
207
217
 
208
218
  @staticmethod
@@ -337,6 +347,7 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
337
347
  id: int,
338
348
  expected_type: Optional[str] = None,
339
349
  raise_error: bool = False,
350
+ extra_fields: Optional[List[str]] = None
340
351
  ) -> ProjectInfo:
341
352
  """
342
353
  Get Project information by ID.
@@ -347,6 +358,8 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
347
358
  :type expected_type: ProjectType, optional
348
359
  :param raise_error: If True raise error if given name is missing in the Project, otherwise skips missing names.
349
360
  :type raise_error: bool, optional
361
+ :param extra_fields: List of extra fields to include in the response.
362
+ :type extra_fields: list[str], optional
350
363
  :raises: Error if type of project is not None and != expected type
351
364
  :return: Information about Project. See :class:`info_sequence<info_sequence>`
352
365
  :rtype: :class:`ProjectInfo`
@@ -384,7 +397,10 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
384
397
 
385
398
 
386
399
  """
387
- info = self._get_info_by_id(id, "projects.info")
400
+ fields = None
401
+ if extra_fields is not None:
402
+ fields = {ApiField.EXTRA_FIELDS: extra_fields}
403
+ info = self._get_info_by_id(id, "projects.info", fields=fields)
388
404
  self._check_project_info(info, id=id, expected_type=expected_type, raise_error=raise_error)
389
405
  return info
390
406
 
@@ -445,7 +461,14 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
445
461
  fields = [
446
462
  x
447
463
  for x in self.info_sequence()
448
- if x not in (ApiField.ITEMS_COUNT, ApiField.SETTINGS, ApiField.CREATED_BY_ID)
464
+ if x
465
+ not in (
466
+ ApiField.ITEMS_COUNT,
467
+ ApiField.SETTINGS,
468
+ ApiField.CREATED_BY_ID,
469
+ ApiField.LOCAL_ENTITIES_COUNT,
470
+ ApiField.REMOTE_ENTITIES_COUNT,
471
+ )
449
472
  ]
450
473
 
451
474
  info = super().get_info_by_name(parent_id, name, fields)
@@ -1231,7 +1254,7 @@ class ProjectApi(CloneableModuleApi, UpdateableModule, RemoveableModuleApi):
1231
1254
  incorrect_entities = api.project.validate_entities_schema(project_id)
1232
1255
 
1233
1256
  for entity in incorrect_entities:
1234
- print(entity.id, entity.name) # Output: 123456, 'image.jpg'
1257
+ print(entity["entity_id"], entity["entity_name"]) # Output: 123456, 'image.jpg'
1235
1258
  """
1236
1259
  validation_schema = self.get_validation_schema(id)
1237
1260
  if not validation_schema:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.405
3
+ Version: 6.73.406
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -1,5 +1,5 @@
1
1
  supervisely/README.md,sha256=XM-DiMC6To3I9RjQZ0c61905EFRR_jnCUx2q3uNR-X8,3331
2
- supervisely/__init__.py,sha256=5wSN2Mq7CuqG9rnlbqXmRwTYUs3ARPN2LMbFZA5gAv8,11010
2
+ supervisely/__init__.py,sha256=lr0ZXE_WCeOpNo-zsynBKIhG3RaeKyXl549b6vk1nfU,11010
3
3
  supervisely/_utils.py,sha256=Wrnck4645QXRZdmMpqIRQ_t6QynEAkYaFfcialxQBIE,19157
4
4
  supervisely/function_wrapper.py,sha256=R5YajTQ0GnRp2vtjwfC9hINkzQc0JiyGsu8TER373xY,1912
5
5
  supervisely/sly_logger.py,sha256=z92Vu5hmC0GgTIJO1n6kPDayRW9__8ix8hL6poDZj-Y,6274
@@ -35,10 +35,10 @@ supervisely/api/import_storage_api.py,sha256=BDCgmR0Hv6OoiRHLCVPKt3iDxSVlQp1WrnK
35
35
  supervisely/api/issues_api.py,sha256=BqDJXmNoTzwc3xe6_-mA7FDFC5QQ-ahGbXk_HmpkSeQ,17925
36
36
  supervisely/api/labeling_job_api.py,sha256=G2_BV_WtA2lAhfw_nAQmWmv1P-pwimD0ba9GVKoGjiA,55537
37
37
  supervisely/api/labeling_queue_api.py,sha256=ilNjAL1d9NSa9yabQn6E-W26YdtooT3ZGXIFZtGnAvY,30158
38
- supervisely/api/module_api.py,sha256=Pqj_BxgHmfba0MGA5PPNU-dbSrwR4Fcyfaqnc-cKwGI,46006
38
+ supervisely/api/module_api.py,sha256=FF8fTRxdR7QbzxyntPDhmTTbnFobCq-Lcujs9DWWK98,46126
39
39
  supervisely/api/object_class_api.py,sha256=7-npNFMYjWNtSXYZg6syc6bX56_oCzDU2kFRPGQWCwA,10399
40
40
  supervisely/api/plugin_api.py,sha256=SFm0IlTTOjuHBLUMgG4d4k6U3cWJocE-SVb-f08fwMQ,5286
41
- supervisely/api/project_api.py,sha256=YMLBXbaZuuv0uzczaxwbIBGKTnXi276Cf-JPUGURb0g,88668
41
+ supervisely/api/project_api.py,sha256=UR9IQ2fMm7te50DtpFrCad1WSS6WQ_GUdXB7NA6NZ34,89642
42
42
  supervisely/api/project_class_api.py,sha256=5cyjdGPPb2tpttu5WmYoOxUNiDxqiojschkhZumF0KM,1426
43
43
  supervisely/api/remote_storage_api.py,sha256=1O4rTIwW8s9gxC00yvFuKbEMGNsa7YSRlZ8j494ARwY,17793
44
44
  supervisely/api/report_api.py,sha256=Om7CGulUbQ4BuJ16eDtz7luLe0JQNqab-LoLpUXu7YE,7123
@@ -1114,9 +1114,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1114
1114
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1115
1115
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1116
1116
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1117
- supervisely-6.73.405.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1118
- supervisely-6.73.405.dist-info/METADATA,sha256=eoIZ9o5RCIOMK-EjAo_n6uRtoY4phdboCiZPjdSOPFg,35254
1119
- supervisely-6.73.405.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1120
- supervisely-6.73.405.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1121
- supervisely-6.73.405.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1122
- supervisely-6.73.405.dist-info/RECORD,,
1117
+ supervisely-6.73.406.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1118
+ supervisely-6.73.406.dist-info/METADATA,sha256=696rYpRYkDoHehnuB_Y2ngM5dHHY_hX0qlMyiyZ9PqA,35254
1119
+ supervisely-6.73.406.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1120
+ supervisely-6.73.406.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1121
+ supervisely-6.73.406.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1122
+ supervisely-6.73.406.dist-info/RECORD,,