supervisely 6.73.327__py3-none-any.whl → 6.73.328__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.
@@ -549,7 +549,7 @@ class TagMeta(KeyObject, JsonSerializable):
549
549
  print(meta_coat_color.possible_values)
550
550
  # Output: ['brown', 'white', 'black', 'red', 'chocolate', 'gold', 'grey', 'bald (no coat)']
551
551
  """
552
- if self.value_type is TagValueType.ONEOF_STRING:
552
+ if self.value_type == TagValueType.ONEOF_STRING:
553
553
  if value in self._possible_values:
554
554
  raise ValueError("Value {} already exists for tag {}".format(value, self.name))
555
555
  else:
supervisely/api/api.py CHANGED
@@ -83,7 +83,6 @@ API_TOKEN = "API_TOKEN"
83
83
  TASK_ID = "TASK_ID"
84
84
  SUPERVISELY_ENV_FILE = os.path.join(Path.home(), "supervisely.env")
85
85
 
86
-
87
86
  class ApiContext:
88
87
  """
89
88
  Context manager for the API object for optimization purposes.
@@ -372,7 +371,8 @@ class Api:
372
371
  self.retry_count = retry_count
373
372
  self.retry_sleep_sec = retry_sleep_sec
374
373
 
375
- self._require_https_redirect_check = not self.server_address.startswith("https://")
374
+ self._skip_https_redirect_check = sly_env.supervisely_skip_https_user_helper_check()
375
+ self._require_https_redirect_check = False if self._skip_https_redirect_check else not self.server_address.startswith("https://")
376
376
 
377
377
  if check_instance_version:
378
378
  self._check_version(None if check_instance_version is True else check_instance_version)
@@ -639,7 +639,8 @@ class Api:
639
639
  :return: Response object
640
640
  :rtype: :class:`Response<Response>`
641
641
  """
642
- self._check_https_redirect()
642
+ if not self._skip_https_redirect_check:
643
+ self._check_https_redirect()
643
644
  if retries is None:
644
645
  retries = self.retry_count
645
646
 
@@ -721,7 +722,8 @@ class Api:
721
722
  :return: Response object
722
723
  :rtype: :class:`Response<Response>`
723
724
  """
724
- self._check_https_redirect()
725
+ if not self._skip_https_redirect_check:
726
+ self._check_https_redirect()
725
727
  if retries is None:
726
728
  retries = self.retry_count
727
729
 
@@ -1637,7 +1639,8 @@ class Api:
1637
1639
  f"Setting global API semaphore size to {semaphore_size} from environment variable"
1638
1640
  )
1639
1641
  else:
1640
- self._check_https_redirect()
1642
+ if not self._skip_https_redirect_check:
1643
+ self._check_https_redirect()
1641
1644
  if self.server_address.startswith("https://"):
1642
1645
  size = 10
1643
1646
  if "app.supervise" in self.server_address:
supervisely/io/env.py CHANGED
@@ -570,3 +570,18 @@ def supervisely_server_path_prefix() -> str:
570
570
  default="",
571
571
  raise_not_found=False,
572
572
  )
573
+
574
+ def supervisely_skip_https_user_helper_check() -> bool:
575
+ """Returns decision to skip `_check_https_redirect` for API from environment variable using following
576
+ - SUPERVISELY_SKIP_HTTPS_USER_HELPER_CHECK"
577
+
578
+ :return: decision to skip `_check_https_redirect` for API
579
+ :rtype: bool
580
+ """
581
+ return _parse_from_env(
582
+ name="supervisely_skip_https_user_helper_check",
583
+ keys=["SUPERVISELY_SKIP_HTTPS_USER_HELPER_CHECK"],
584
+ postprocess_fn=flag_from_env,
585
+ default=False,
586
+ raise_not_found=False,
587
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supervisely
3
- Version: 6.73.327
3
+ Version: 6.73.328
4
4
  Summary: Supervisely Python SDK.
5
5
  Home-page: https://github.com/supervisely/supervisely
6
6
  Author: Supervisely
@@ -15,14 +15,14 @@ supervisely/annotation/obj_class_mapper.py,sha256=aIJDoRULqcAOD2a1CQPk2OOF8k3VPP
15
15
  supervisely/annotation/renamer.py,sha256=rVvNLtpfd1kKUVPgm8VlLmYSDByWjriJ92FobC4buqY,1944
16
16
  supervisely/annotation/tag.py,sha256=iBHI0s52TiSvuGKL2p-mkd1Jpkmx4d7tTy9QZ7Ta9Hk,17635
17
17
  supervisely/annotation/tag_collection.py,sha256=MVPTzer9rLpD4O0g2XhYFUheK7-ILgwAXDJd1em3kZ8,10015
18
- supervisely/annotation/tag_meta.py,sha256=nTRKVuW_h6mGdTxuwXvtR2ERhwOvjjdUf635ONLFFx8,27767
18
+ supervisely/annotation/tag_meta.py,sha256=GESucIwSbgrZEo22XMWdghb7iySws-VanWQmmDddHwM,27767
19
19
  supervisely/annotation/tag_meta_collection.py,sha256=JY2wAo4dF47UylYeglkJtRtpVOArGjf3dXeEYIHFWP0,14491
20
20
  supervisely/annotation/tag_meta_mapper.py,sha256=RWeTrxJ64syodyhXIRSH007bX6Hr3B45tG14YTcpwSU,1639
21
21
  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=kuk4qwojTJxYr2iqAKbW-QhWw_DFc4TsjA2Wc2MEaqw,68449
25
- supervisely/api/api.py,sha256=6TczKT1t0MWlbArSW31RmeyWP04pqngfUO_NrG5FETE,66287
25
+ supervisely/api/api.py,sha256=DpLa2rTFKa9we4WUZD8jRuurK6G3OYsdnBb2VehEik0,66585
26
26
  supervisely/api/app_api.py,sha256=RsbVej8WxWVn9cNo5s3Fqd1symsCdsfOaKVBKEUapRY,71927
27
27
  supervisely/api/dataset_api.py,sha256=GH7prDRJKyJlTv_7_Y-RkTwJN7ED4EkXNqqmi3iIdI4,41352
28
28
  supervisely/api/file_api.py,sha256=bVWv6kf3B5n6qlB14HmUa6iUr8ara5cr-pPK8QC7XWg,92932
@@ -713,7 +713,7 @@ supervisely/imaging/font.py,sha256=0XcmWhlw7y2PAhrWgcsfInyRWj0WnlFpMSEXXilR8UA,2
713
713
  supervisely/imaging/image.py,sha256=1KNc4qRbP9OlI4Yta07Kc2ohAgSBJ_9alF9Jag74w30,41873
714
714
  supervisely/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
715
715
  supervisely/io/docker_utils.py,sha256=hb_HXGM8IYB0PF-nD7NxMwaHgzaxIFxofsUzQ_RCUZI,7935
716
- supervisely/io/env.py,sha256=QQDDE79sz4inRHfcXoAKr3IzqkXQ0qleJ0YYojmHoCk,17712
716
+ supervisely/io/env.py,sha256=DLsoRhouPT-y5wJzzJBs7zhJ2UxOIvIcQVbVLP5Yx7U,18256
717
717
  supervisely/io/exception_handlers.py,sha256=_nAgMFeE94bCxEvWakR82hMtdOJUyn7Gc7OymMxI9WI,36484
718
718
  supervisely/io/fs.py,sha256=DvLDzZUEpo7_ieSbt1gw8BYmoSsNUBcGKpXVs0Wqckk,55296
719
719
  supervisely/io/fs_cache.py,sha256=985gvBGzveLcDudgz10E4EWVjP9jxdU1Pa0GFfCBoCA,6520
@@ -1082,9 +1082,9 @@ supervisely/worker_proto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
1082
1082
  supervisely/worker_proto/worker_api_pb2.py,sha256=VQfi5JRBHs2pFCK1snec3JECgGnua3Xjqw_-b3aFxuM,59142
1083
1083
  supervisely/worker_proto/worker_api_pb2_grpc.py,sha256=3BwQXOaP9qpdi0Dt9EKG--Lm8KGN0C5AgmUfRv77_Jk,28940
1084
1084
  supervisely_lib/__init__.py,sha256=7-3QnN8Zf0wj8NCr2oJmqoQWMKKPKTECvjH9pd2S5vY,159
1085
- supervisely-6.73.327.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1086
- supervisely-6.73.327.dist-info/METADATA,sha256=v5BHJ9kDMHtWYxnC5MY25npUXE6JVb-99QdNmSpeE7w,33596
1087
- supervisely-6.73.327.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
1088
- supervisely-6.73.327.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1089
- supervisely-6.73.327.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1090
- supervisely-6.73.327.dist-info/RECORD,,
1085
+ supervisely-6.73.328.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
1086
+ supervisely-6.73.328.dist-info/METADATA,sha256=zb3oE_o2mfmVo-yfobR0aPJ4AjQYZFIpldlNALmq59Y,33596
1087
+ supervisely-6.73.328.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1088
+ supervisely-6.73.328.dist-info/entry_points.txt,sha256=U96-5Hxrp2ApRjnCoUiUhWMqijqh8zLR03sEhWtAcms,102
1089
+ supervisely-6.73.328.dist-info/top_level.txt,sha256=kcFVwb7SXtfqZifrZaSE3owHExX4gcNYe7Q2uoby084,28
1090
+ supervisely-6.73.328.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5