hubmap-search-sdk 1.0.0a1__py3-none-any.whl → 1.0.0a2__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.
- hubmap_search_sdk/_base_client.py +12 -0
- hubmap_search_sdk/_version.py +1 -1
- {hubmap_search_sdk-1.0.0a1.dist-info → hubmap_search_sdk-1.0.0a2.dist-info}/METADATA +3 -3
- {hubmap_search_sdk-1.0.0a1.dist-info → hubmap_search_sdk-1.0.0a2.dist-info}/RECORD +6 -6
- {hubmap_search_sdk-1.0.0a1.dist-info → hubmap_search_sdk-1.0.0a2.dist-info}/WHEEL +0 -0
- {hubmap_search_sdk-1.0.0a1.dist-info → hubmap_search_sdk-1.0.0a2.dist-info}/licenses/LICENSE +0 -0
@@ -462,6 +462,9 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
462
462
|
raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`")
|
463
463
|
|
464
464
|
headers = self._build_headers(options, retries_taken=retries_taken)
|
465
|
+
# If it's a GET request and there's no body (no json_data or extra_json), remove Content-Type
|
466
|
+
if options.method.lower()=='get' and not json_data:
|
467
|
+
headers.pop('Content-Type', None)
|
465
468
|
params = _merge_mappings(self.default_query, options.params)
|
466
469
|
content_type = headers.get("Content-Type")
|
467
470
|
files = options.files
|
@@ -999,6 +1002,15 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
999
1002
|
response.raise_for_status()
|
1000
1003
|
except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code
|
1001
1004
|
log.debug("Encountered httpx.HTTPStatusError", exc_info=True)
|
1005
|
+
if response.status_code in (301, 302, 303, 307, 308):
|
1006
|
+
return self._process_response(
|
1007
|
+
cast_to=cast_to,
|
1008
|
+
options=options,
|
1009
|
+
response=response,
|
1010
|
+
stream=stream,
|
1011
|
+
stream_cls=stream_cls,
|
1012
|
+
retries_taken=retries_taken,
|
1013
|
+
)
|
1002
1014
|
|
1003
1015
|
if remaining_retries > 0 and self._should_retry(err.response):
|
1004
1016
|
err.response.close()
|
hubmap_search_sdk/_version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: hubmap_search_sdk
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.0a2
|
4
4
|
Summary: The official Python library for the hubmap-search-sdk API
|
5
5
|
Project-URL: Homepage, https://github.com/hubmapconsortium/search-python-sdk
|
6
6
|
Project-URL: Repository, https://github.com/hubmapconsortium/search-python-sdk
|
@@ -29,11 +29,11 @@ Requires-Dist: sniffio
|
|
29
29
|
Requires-Dist: typing-extensions<5,>=4.10
|
30
30
|
Description-Content-Type: text/markdown
|
31
31
|
|
32
|
-
#
|
32
|
+
# HuBMAP Search SDK Python API Library
|
33
33
|
|
34
34
|
[](https://pypi.org/project/hubmap_search_sdk/)
|
35
35
|
|
36
|
-
The
|
36
|
+
The HuBMAP Search SDK Python library provides convenient access to the HuBMAP Search REST API from any Python 3.8+
|
37
37
|
application. The library includes type definitions for all request params and response fields,
|
38
38
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
39
39
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
hubmap_search_sdk/__init__.py,sha256=eUNBFfdHquxHRjxdtY6YQ0pw-jeQuVT7fm5mtYzB8hY,2545
|
2
|
-
hubmap_search_sdk/_base_client.py,sha256=
|
2
|
+
hubmap_search_sdk/_base_client.py,sha256=k6ZlBU4noBUiaK569l3DbV0CPkHuvlnIXAbyvqUNhPc,65547
|
3
3
|
hubmap_search_sdk/_client.py,sha256=_B5lY2StPqLRgECImsspnws_3o0WbTfeMwZvhZTLRfo,19485
|
4
4
|
hubmap_search_sdk/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
5
|
hubmap_search_sdk/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
@@ -11,7 +11,7 @@ hubmap_search_sdk/_resource.py,sha256=z9CsPEtCJP9np1GfCrGKkqUmlGd10QdY9ZtINq4vyI
|
|
11
11
|
hubmap_search_sdk/_response.py,sha256=V9jyjwgBvmdB9MqltIZFs4gLcdbj1MmLdhwS-ILkBSk,28881
|
12
12
|
hubmap_search_sdk/_streaming.py,sha256=Anm1GDFtbRi3IL4NaaajTXDlwv75_Rm-bi6TD_0tSxU,10136
|
13
13
|
hubmap_search_sdk/_types.py,sha256=Xxqpn7vIdO1HG3-TJaQdHFEI1etNZxdSS3QOOeakw0A,6154
|
14
|
-
hubmap_search_sdk/_version.py,sha256=
|
14
|
+
hubmap_search_sdk/_version.py,sha256=hMsbl_KqnMkMvHbKEdSDU6uSVrd0yXTV_YP_jwHIWF4,177
|
15
15
|
hubmap_search_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
hubmap_search_sdk/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
hubmap_search_sdk/_utils/_logs.py,sha256=vEolshfk2D36E9yV2JC0vIbMfBmiM-lIAw-ledyLVVI,807
|
@@ -48,7 +48,7 @@ hubmap_search_sdk/types/search_execute_query_params.py,sha256=La2udYbqLYPTzIRJtt
|
|
48
48
|
hubmap_search_sdk/types/update_update_document_at_index_params.py,sha256=F6bL-5xzqfI1ClajCan9M2pWhKyP2qFENNXHE1unj54,341
|
49
49
|
hubmap_search_sdk/types/update_update_document_params.py,sha256=LM65ha6n6USOen2DqlL8R0N8APX9uAduWzqReXqJWOI,302
|
50
50
|
hubmap_search_sdk/types/update_update_document_with_scope_params.py,sha256=3Se48DT25C8gP_yvEoYWMg0whAD9qWPWMQH1rpvg8Zc,371
|
51
|
-
hubmap_search_sdk-1.0.
|
52
|
-
hubmap_search_sdk-1.0.
|
53
|
-
hubmap_search_sdk-1.0.
|
54
|
-
hubmap_search_sdk-1.0.
|
51
|
+
hubmap_search_sdk-1.0.0a2.dist-info/METADATA,sha256=Rvl96nXoBL-5V-ePStpEOWwVZh1x5pM5QADoUU-zClY,12669
|
52
|
+
hubmap_search_sdk-1.0.0a2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
53
|
+
hubmap_search_sdk-1.0.0a2.dist-info/licenses/LICENSE,sha256=lLxIB8m5gVPdScdg81tBYiNbRkVgIBWcmAN1yJwrOME,1057
|
54
|
+
hubmap_search_sdk-1.0.0a2.dist-info/RECORD,,
|
File without changes
|
{hubmap_search_sdk-1.0.0a1.dist-info → hubmap_search_sdk-1.0.0a2.dist-info}/licenses/LICENSE
RENAMED
File without changes
|