dcicutils 8.14.2__py3-none-any.whl → 8.14.2.1b2__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.
- dcicutils/portal_utils.py +11 -0
- {dcicutils-8.14.2.dist-info → dcicutils-8.14.2.1b2.dist-info}/METADATA +1 -1
- {dcicutils-8.14.2.dist-info → dcicutils-8.14.2.1b2.dist-info}/RECORD +6 -6
- {dcicutils-8.14.2.dist-info → dcicutils-8.14.2.1b2.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.14.2.dist-info → dcicutils-8.14.2.1b2.dist-info}/WHEEL +0 -0
- {dcicutils-8.14.2.dist-info → dcicutils-8.14.2.1b2.dist-info}/entry_points.txt +0 -0
dcicutils/portal_utils.py
CHANGED
@@ -280,6 +280,17 @@ class Portal:
|
|
280
280
|
add_on="check_only=True" if check_only else "")
|
281
281
|
return self.post(f"/{object_type}{'?check_only=True' if check_only else ''}", data).json()
|
282
282
|
|
283
|
+
def head(self, url: str, follow: bool = True, raise_exception: bool = False, **kwargs) -> Optional[int]:
|
284
|
+
try:
|
285
|
+
response = requests.head(self.url(url), **self._kwargs(**kwargs))
|
286
|
+
if response and response.status_code in [301, 302, 303, 307, 308] and (follow is not False):
|
287
|
+
response = response.follow()
|
288
|
+
return response.status_code
|
289
|
+
except Exception as e:
|
290
|
+
if raise_exception is True:
|
291
|
+
raise e
|
292
|
+
return None
|
293
|
+
|
283
294
|
def get_health(self) -> OptionalResponse:
|
284
295
|
return self.get("/health")
|
285
296
|
|
@@ -49,7 +49,7 @@ dcicutils/misc_utils.py,sha256=mO-5i0IUZ2U-P7rnQcC9VURzQ35pz7jFsMZdq6BB_QM,11592
|
|
49
49
|
dcicutils/obfuscation_utils.py,sha256=fo2jOmDRC6xWpYX49u80bVNisqRRoPskFNX3ymFAmjw,5963
|
50
50
|
dcicutils/opensearch_utils.py,sha256=V2exmFYW8Xl2_pGFixF4I2Cc549Opwe4PhFi5twC0M8,1017
|
51
51
|
dcicutils/portal_object_utils.py,sha256=Az3n1aL-PQkN5gOFE6ZqC2XkYsqiwKlq7-tZggs1QN4,11062
|
52
|
-
dcicutils/portal_utils.py,sha256=
|
52
|
+
dcicutils/portal_utils.py,sha256=Ub4rlG6Ir4JVSH1KHQRRtJTU_5yBGzVOKrdIkhqJMLQ,45268
|
53
53
|
dcicutils/progress_bar.py,sha256=R3bWLMYM3Xq9PY7U0JadcFT1m7QmCbrbDp9qs9_Kf_c,19472
|
54
54
|
dcicutils/project_utils.py,sha256=qPdCaFmWUVBJw4rw342iUytwdQC0P-XKpK4mhyIulMM,31250
|
55
55
|
dcicutils/qa_checkers.py,sha256=j0kzo_T5VduKTxgsMTp7xjneyNokumZzI_iz55Y0Jjs,20505
|
@@ -75,8 +75,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
75
75
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
76
76
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
77
77
|
dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
|
78
|
-
dcicutils-8.14.2.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
-
dcicutils-8.14.2.dist-info/METADATA,sha256=
|
80
|
-
dcicutils-8.14.2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
-
dcicutils-8.14.2.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
-
dcicutils-8.14.2.dist-info/RECORD,,
|
78
|
+
dcicutils-8.14.2.1b2.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
+
dcicutils-8.14.2.1b2.dist-info/METADATA,sha256=YjgCoLFr-w4A0Mv7vwkyOmpVr5ziXzSEo4vbaW-WlCU,3446
|
80
|
+
dcicutils-8.14.2.1b2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
+
dcicutils-8.14.2.1b2.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
+
dcicutils-8.14.2.1b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|