ncbi-datasets-pyclient 18.13.0__py3-none-any.whl → 18.14.0__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.
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "v18.13.0"
17
+ __version__ = "v18.14.0"
18
18
 
19
19
  # Define package exports
20
20
  __all__ = [
@@ -91,7 +91,7 @@ class ApiClient:
91
91
  self.default_headers[header_name] = header_value
92
92
  self.cookie = cookie
93
93
  # Set default User-Agent.
94
- self.user_agent = 'OpenAPI-Generator/v18.13.0/python'
94
+ self.user_agent = 'OpenAPI-Generator/v18.14.0/python'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  def __enter__(self):
@@ -312,7 +312,7 @@ class ApiClient:
312
312
  return_data = self.__deserialize_file(response_data)
313
313
  elif response_type is not None:
314
314
  match = None
315
- content_type = response_data.getheader('content-type')
315
+ content_type = response_data.headers.get('content-type')
316
316
  if content_type is not None:
317
317
  match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
318
318
  encoding = match.group(1) if match else "utf-8"
@@ -329,7 +329,7 @@ class ApiClient:
329
329
  return ApiResponse(
330
330
  status_code = response_data.status,
331
331
  data = return_data,
332
- headers = response_data.getheaders(),
332
+ headers = response_data.headers,
333
333
  raw_data = response_data.data
334
334
  )
335
335
 
@@ -701,7 +701,7 @@ class ApiClient:
701
701
  os.close(fd)
702
702
  os.remove(path)
703
703
 
704
- content_disposition = response.getheader("Content-Disposition")
704
+ content_disposition = response.headers.get("Content-Disposition")
705
705
  if content_disposition:
706
706
  m = re.search(
707
707
  r'filename=[\'"]?([^\'"\s]+)[\'"]?',
@@ -165,7 +165,7 @@ class Configuration:
165
165
  :param ca_cert_data: verify the peer using concatenated CA certificate data
166
166
  in PEM (str) or DER (bytes) format.
167
167
  :param cert_file: the path to a client certificate file, for mTLS.
168
- :param key_file: the path to a client key file, for mTLS.
168
+ :param key_file: the path to a client key file, for mTLS.
169
169
 
170
170
  :Example:
171
171
 
@@ -506,6 +506,7 @@ conf = ncbi.datasets.openapi.Configuration(
506
506
  password = ""
507
507
  if self.password is not None:
508
508
  password = self.password
509
+
509
510
  return urllib3.util.make_headers(
510
511
  basic_auth=username + ':' + password
511
512
  ).get('authorization')
@@ -545,7 +546,7 @@ conf = ncbi.datasets.openapi.Configuration(
545
546
  "OS: {env}\n"\
546
547
  "Python Version: {pyversion}\n"\
547
548
  "Version of the API: v2\n"\
548
- "SDK Package Version: v18.13.0".\
549
+ "SDK Package Version: v18.14.0".\
549
550
  format(env=sys.platform, pyversion=sys.version)
550
551
 
551
552
  def get_host_settings(self) -> List[HostSetting]:
@@ -593,6 +594,7 @@ conf = ncbi.datasets.openapi.Configuration(
593
594
  variable_name, variable['default_value'])
594
595
 
595
596
  if 'enum_values' in variable \
597
+ and variable['enum_values'] \
596
598
  and used_value not in variable['enum_values']:
597
599
  raise ValueError(
598
600
  "The variable `{0}` in the host URL has invalid value "
@@ -128,7 +128,7 @@ class ApiException(OpenApiException):
128
128
  self.body = http_resp.data.decode('utf-8')
129
129
  except Exception:
130
130
  pass
131
- self.headers = http_resp.getheaders()
131
+ self.headers = http_resp.headers
132
132
 
133
133
  @classmethod
134
134
  def from_response(
@@ -169,8 +169,11 @@ class ApiException(OpenApiException):
169
169
  error_message += "HTTP response headers: {0}\n".format(
170
170
  self.headers)
171
171
 
172
- if self.data or self.body:
173
- error_message += "HTTP response body: {0}\n".format(self.data or self.body)
172
+ if self.body:
173
+ error_message += "HTTP response body: {0}\n".format(self.body)
174
+
175
+ if self.data:
176
+ error_message += "HTTP response data: {0}\n".format(self.data)
174
177
 
175
178
  return error_message
176
179
 
@@ -34,7 +34,8 @@ class V2TaxonomyImageMetadataResponse(BaseModel):
34
34
  source: Optional[StrictStr] = None
35
35
  image_sizes: Optional[List[V2ImageSize]] = None
36
36
  format: Optional[StrictStr] = None
37
- __properties: ClassVar[List[str]] = ["tax_id", "src", "license", "attribution", "source", "image_sizes", "format"]
37
+ license_url: Optional[StrictStr] = None
38
+ __properties: ClassVar[List[str]] = ["tax_id", "src", "license", "attribution", "source", "image_sizes", "format", "license_url"]
38
39
 
39
40
  model_config = ConfigDict(
40
41
  populate_by_name=True,
@@ -93,7 +94,8 @@ class V2TaxonomyImageMetadataResponse(BaseModel):
93
94
  "attribution": obj.get("attribution"),
94
95
  "source": obj.get("source"),
95
96
  "image_sizes": obj.get("image_sizes"),
96
- "format": obj.get("format")
97
+ "format": obj.get("format"),
98
+ "license_url": obj.get("license_url")
97
99
  })
98
100
  return _obj
99
101
 
@@ -48,12 +48,17 @@ class RESTResponse(io.IOBase):
48
48
  self.data = self.response.data
49
49
  return self.data
50
50
 
51
+ @property
52
+ def headers(self):
53
+ """Returns a dictionary of response headers."""
54
+ return self.response.headers
55
+
51
56
  def getheaders(self):
52
- """Returns a dictionary of the response headers."""
57
+ """Returns a dictionary of the response headers; use ``headers`` instead."""
53
58
  return self.response.headers
54
59
 
55
60
  def getheader(self, name, default=None):
56
- """Returns a given response header."""
61
+ """Returns a given response header; use ``headers.get()`` instead."""
57
62
  return self.response.headers.get(name, default)
58
63
 
59
64
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ncbi-datasets-pyclient
3
- Version: 18.13.0
3
+ Version: 18.14.0
4
4
  Summary: NCBI Datasets API
5
5
  Home-page:
6
6
  Author: NCBI
@@ -25,8 +25,8 @@ The NCBI Datasets version 2 API is updated often to add new features, fix bugs,
25
25
  This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
26
26
 
27
27
  - API version: v2
28
- - Package version: v18.13.0
29
- - Generator version: 7.17.0
28
+ - Package version: v18.14.0
29
+ - Generator version: 7.18.0
30
30
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
31
31
 
32
32
  ## Requirements.
@@ -1,12 +1,12 @@
1
1
  ncbi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  ncbi/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- ncbi/datasets/openapi/__init__.py,sha256=baMVUyNiDaG3l5F_gXFQgkVBnsPMo29hDIMJLCMaOd8,48153
4
- ncbi/datasets/openapi/api_client.py,sha256=4TaKsOQaISnSI7CGV3ui04bP_lot0YI4yQpow4nFzJ0,27915
3
+ ncbi/datasets/openapi/__init__.py,sha256=M-TECgwgDztgK2I51HX90ZFH5f-YPxns-HoL2ZtV1KQ,48153
4
+ ncbi/datasets/openapi/api_client.py,sha256=TgI9ofKkCpGh6JhkgD0eEDc0KoqLg3vTsEc7fBeYV-k,27914
5
5
  ncbi/datasets/openapi/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
6
- ncbi/datasets/openapi/configuration.py,sha256=3NnvRFxXWLT8rjkPD0y_04E0-ngEH13YSqrHqcFAHsc,19581
7
- ncbi/datasets/openapi/exceptions.py,sha256=uJp-1_qZGrZC7YdvUkzgDw8tiahMY76Z9RWMAPr1Ui8,6551
6
+ ncbi/datasets/openapi/configuration.py,sha256=Y2oUyxFeIocARGWgMcGM7Yz45aEN_67kPMOEyPHYh9U,19631
7
+ ncbi/datasets/openapi/exceptions.py,sha256=xadY9SBMaA6_xxeVXrQxSZ0HAZzTsGyLV2K0FvEcyyM,6618
8
8
  ncbi/datasets/openapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- ncbi/datasets/openapi/rest.py,sha256=reVTSnJHoLWgb5QOTljw2ch_0y6rxGxjUsuDpBvvSck,9555
9
+ ncbi/datasets/openapi/rest.py,sha256=Ctofd5lL4uvuj0TGuAZJCuow61p24oeTTwncy8HlnuU,9742
10
10
  ncbi/datasets/openapi/api/__init__.py,sha256=2VCn5BqhrzOpHK-aKjTkyqdMh8X0NQdS_crGrGHNxU4,541
11
11
  ncbi/datasets/openapi/api/bio_sample_api.py,sha256=nvtfxO09Nb7ewWRsytXl0d1isnc4Mc8h7_AKNYVEvdM,12032
12
12
  ncbi/datasets/openapi/api/gene_api.py,sha256=N3zPvT7mDP3oTOnexBop50xsDotuEEd5UjRYRF0gkkQ,542577
@@ -134,7 +134,7 @@ ncbi/datasets/openapi/models/v2_taxonomy_filtered_subtree_response_edge.py,sha25
134
134
  ncbi/datasets/openapi/models/v2_taxonomy_filtered_subtree_response_edge_child_status.py,sha256=lO-NRHsk-XiLABelQRpqR1LSB-BHNTaLcveuThkI5CQ,1077
135
135
  ncbi/datasets/openapi/models/v2_taxonomy_filtered_subtree_response_edges_entry.py,sha256=g7b8u9SZ4RdkaR6rQGP3d9y2E5uA7AZZJm_pGFpj_uA,3658
136
136
  ncbi/datasets/openapi/models/v2_taxonomy_image_metadata_request.py,sha256=_6KXWk76iPs3I2atcYdfG9Orufiairit5P3Yyzy2VRY,2647
137
- ncbi/datasets/openapi/models/v2_taxonomy_image_metadata_response.py,sha256=7cFNNgIw7Xq0TEmBJtz1HkUqzCTUuTOYcvDsf4TDFeY,3302
137
+ ncbi/datasets/openapi/models/v2_taxonomy_image_metadata_response.py,sha256=SxMnzSfBQiJxhV6ZLkG-I9_ucXw7J1XQvd3C5M9bdGs,3412
138
138
  ncbi/datasets/openapi/models/v2_taxonomy_image_request.py,sha256=uCDfoKmYlazJn19tpyfTaFtXl9VbCCvu6rxO9kkXdHM,2875
139
139
  ncbi/datasets/openapi/models/v2_taxonomy_links_request.py,sha256=JPt3wtf5HXzFbmFU1cPzWHJls-hr05ecEdf06FlPooc,2615
140
140
  ncbi/datasets/openapi/models/v2_taxonomy_links_response.py,sha256=0jrssuvulVw4aK1Bniu30OP-Zlb-KkyYBdIWizFf9o4,4058
@@ -298,8 +298,8 @@ ncbi/datasets/openapi/models/v2reports_warning.py,sha256=ra1UBVPtnrtaV9oLkmfizs4
298
298
  ncbi/datasets/openapi/models/v2reports_warning_gene_warning_code.py,sha256=6RDXn2v5GymCsGQMtoFVyp_x6qN_II3GKZRR5zsIEl8,1378
299
299
  ncbi/datasets/openapi/models/v2reports_warning_replaced_id.py,sha256=MQh3OXNaIEtRSYq0sp-V3FqfD8qHra0dp-va3xsHG4I,2745
300
300
  ncbi/datasets/openapi/models/v2reports_wgs_info.py,sha256=LDWjSZgSVmdUg894kdeBsOCIHWmQUKrA90_4ktnmM2o,2903
301
- ncbi_datasets_pyclient-18.13.0.dist-info/licenses/LICENSE,sha256=4hywPAiqr3WLJWIV6zs2wK9aCcBUQVRwLJWPi2AegMk,1501
302
- ncbi_datasets_pyclient-18.13.0.dist-info/METADATA,sha256=DI9tLbUezN-8hSOognBzQS9asAOLArOjjNNSdlww35s,43941
303
- ncbi_datasets_pyclient-18.13.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
304
- ncbi_datasets_pyclient-18.13.0.dist-info/top_level.txt,sha256=nraz3S7SoUNG6x6jm3du082BqAAEJWm-Jm5TmKNo320,5
305
- ncbi_datasets_pyclient-18.13.0.dist-info/RECORD,,
301
+ ncbi_datasets_pyclient-18.14.0.dist-info/licenses/LICENSE,sha256=4hywPAiqr3WLJWIV6zs2wK9aCcBUQVRwLJWPi2AegMk,1501
302
+ ncbi_datasets_pyclient-18.14.0.dist-info/METADATA,sha256=LyBJa_ZcFQDEgR9TZrlAiA2dfd1PSoYwUh4uISwVwg0,43941
303
+ ncbi_datasets_pyclient-18.14.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
304
+ ncbi_datasets_pyclient-18.14.0.dist-info/top_level.txt,sha256=nraz3S7SoUNG6x6jm3du082BqAAEJWm-Jm5TmKNo320,5
305
+ ncbi_datasets_pyclient-18.14.0.dist-info/RECORD,,