vectorize_client.api.extraction_api
Vectorize API (Beta)
API for Vectorize services
The version of the OpenAPI document: 0.0.1 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
1# coding: utf-8 2 3""" 4 Vectorize API (Beta) 5 6 API for Vectorize services 7 8 The version of the OpenAPI document: 0.0.1 9 Generated by OpenAPI Generator (https://openapi-generator.tech) 10 11 Do not edit the class manually. 12""" # noqa: E501 13 14import warnings 15from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt 16from typing import Any, Dict, List, Optional, Tuple, Union 17from typing_extensions import Annotated 18 19from pydantic import StrictStr 20from vectorize_client.models.extraction_result_response import ExtractionResultResponse 21from vectorize_client.models.start_extraction_request import StartExtractionRequest 22from vectorize_client.models.start_extraction_response import StartExtractionResponse 23 24from vectorize_client.api_client import ApiClient, RequestSerialized 25from vectorize_client.api_response import ApiResponse 26from vectorize_client.rest import RESTResponseType 27 28 29class ExtractionApi: 30 """NOTE: This class is auto generated by OpenAPI Generator 31 Ref: https://openapi-generator.tech 32 33 Do not edit the class manually. 34 """ 35 36 def __init__(self, api_client=None) -> None: 37 if api_client is None: 38 api_client = ApiClient.get_default() 39 self.api_client = api_client 40 41 42 @validate_call 43 def get_extraction_result( 44 self, 45 organization: StrictStr, 46 extraction_id: StrictStr, 47 _request_timeout: Union[ 48 None, 49 Annotated[StrictFloat, Field(gt=0)], 50 Tuple[ 51 Annotated[StrictFloat, Field(gt=0)], 52 Annotated[StrictFloat, Field(gt=0)] 53 ] 54 ] = None, 55 _request_auth: Optional[Dict[StrictStr, Any]] = None, 56 _content_type: Optional[StrictStr] = None, 57 _headers: Optional[Dict[StrictStr, Any]] = None, 58 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 59 ) -> ExtractionResultResponse: 60 """Get extraction result 61 62 63 :param organization: (required) 64 :type organization: str 65 :param extraction_id: (required) 66 :type extraction_id: str 67 :param _request_timeout: timeout setting for this request. If one 68 number provided, it will be total request 69 timeout. It can also be a pair (tuple) of 70 (connection, read) timeouts. 71 :type _request_timeout: int, tuple(int, int), optional 72 :param _request_auth: set to override the auth_settings for an a single 73 request; this effectively ignores the 74 authentication in the spec for a single request. 75 :type _request_auth: dict, optional 76 :param _content_type: force content-type for the request. 77 :type _content_type: str, Optional 78 :param _headers: set to override the headers for a single 79 request; this effectively ignores the headers 80 in the spec for a single request. 81 :type _headers: dict, optional 82 :param _host_index: set to override the host_index for a single 83 request; this effectively ignores the host_index 84 in the spec for a single request. 85 :type _host_index: int, optional 86 :return: Returns the result object. 87 """ # noqa: E501 88 89 _param = self._get_extraction_result_serialize( 90 organization=organization, 91 extraction_id=extraction_id, 92 _request_auth=_request_auth, 93 _content_type=_content_type, 94 _headers=_headers, 95 _host_index=_host_index 96 ) 97 98 _response_types_map: Dict[str, Optional[str]] = { 99 '200': "ExtractionResultResponse", 100 '400': "GetPipelines400Response", 101 '401': "GetPipelines400Response", 102 '403': "GetPipelines400Response", 103 '404': "GetPipelines400Response", 104 '500': "GetPipelines400Response", 105 } 106 response_data = self.api_client.call_api( 107 *_param, 108 _request_timeout=_request_timeout 109 ) 110 response_data.read() 111 return self.api_client.response_deserialize( 112 response_data=response_data, 113 response_types_map=_response_types_map, 114 ).data 115 116 117 @validate_call 118 def get_extraction_result_with_http_info( 119 self, 120 organization: StrictStr, 121 extraction_id: StrictStr, 122 _request_timeout: Union[ 123 None, 124 Annotated[StrictFloat, Field(gt=0)], 125 Tuple[ 126 Annotated[StrictFloat, Field(gt=0)], 127 Annotated[StrictFloat, Field(gt=0)] 128 ] 129 ] = None, 130 _request_auth: Optional[Dict[StrictStr, Any]] = None, 131 _content_type: Optional[StrictStr] = None, 132 _headers: Optional[Dict[StrictStr, Any]] = None, 133 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 134 ) -> ApiResponse[ExtractionResultResponse]: 135 """Get extraction result 136 137 138 :param organization: (required) 139 :type organization: str 140 :param extraction_id: (required) 141 :type extraction_id: str 142 :param _request_timeout: timeout setting for this request. If one 143 number provided, it will be total request 144 timeout. It can also be a pair (tuple) of 145 (connection, read) timeouts. 146 :type _request_timeout: int, tuple(int, int), optional 147 :param _request_auth: set to override the auth_settings for an a single 148 request; this effectively ignores the 149 authentication in the spec for a single request. 150 :type _request_auth: dict, optional 151 :param _content_type: force content-type for the request. 152 :type _content_type: str, Optional 153 :param _headers: set to override the headers for a single 154 request; this effectively ignores the headers 155 in the spec for a single request. 156 :type _headers: dict, optional 157 :param _host_index: set to override the host_index for a single 158 request; this effectively ignores the host_index 159 in the spec for a single request. 160 :type _host_index: int, optional 161 :return: Returns the result object. 162 """ # noqa: E501 163 164 _param = self._get_extraction_result_serialize( 165 organization=organization, 166 extraction_id=extraction_id, 167 _request_auth=_request_auth, 168 _content_type=_content_type, 169 _headers=_headers, 170 _host_index=_host_index 171 ) 172 173 _response_types_map: Dict[str, Optional[str]] = { 174 '200': "ExtractionResultResponse", 175 '400': "GetPipelines400Response", 176 '401': "GetPipelines400Response", 177 '403': "GetPipelines400Response", 178 '404': "GetPipelines400Response", 179 '500': "GetPipelines400Response", 180 } 181 response_data = self.api_client.call_api( 182 *_param, 183 _request_timeout=_request_timeout 184 ) 185 response_data.read() 186 return self.api_client.response_deserialize( 187 response_data=response_data, 188 response_types_map=_response_types_map, 189 ) 190 191 192 @validate_call 193 def get_extraction_result_without_preload_content( 194 self, 195 organization: StrictStr, 196 extraction_id: StrictStr, 197 _request_timeout: Union[ 198 None, 199 Annotated[StrictFloat, Field(gt=0)], 200 Tuple[ 201 Annotated[StrictFloat, Field(gt=0)], 202 Annotated[StrictFloat, Field(gt=0)] 203 ] 204 ] = None, 205 _request_auth: Optional[Dict[StrictStr, Any]] = None, 206 _content_type: Optional[StrictStr] = None, 207 _headers: Optional[Dict[StrictStr, Any]] = None, 208 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 209 ) -> RESTResponseType: 210 """Get extraction result 211 212 213 :param organization: (required) 214 :type organization: str 215 :param extraction_id: (required) 216 :type extraction_id: str 217 :param _request_timeout: timeout setting for this request. If one 218 number provided, it will be total request 219 timeout. It can also be a pair (tuple) of 220 (connection, read) timeouts. 221 :type _request_timeout: int, tuple(int, int), optional 222 :param _request_auth: set to override the auth_settings for an a single 223 request; this effectively ignores the 224 authentication in the spec for a single request. 225 :type _request_auth: dict, optional 226 :param _content_type: force content-type for the request. 227 :type _content_type: str, Optional 228 :param _headers: set to override the headers for a single 229 request; this effectively ignores the headers 230 in the spec for a single request. 231 :type _headers: dict, optional 232 :param _host_index: set to override the host_index for a single 233 request; this effectively ignores the host_index 234 in the spec for a single request. 235 :type _host_index: int, optional 236 :return: Returns the result object. 237 """ # noqa: E501 238 239 _param = self._get_extraction_result_serialize( 240 organization=organization, 241 extraction_id=extraction_id, 242 _request_auth=_request_auth, 243 _content_type=_content_type, 244 _headers=_headers, 245 _host_index=_host_index 246 ) 247 248 _response_types_map: Dict[str, Optional[str]] = { 249 '200': "ExtractionResultResponse", 250 '400': "GetPipelines400Response", 251 '401': "GetPipelines400Response", 252 '403': "GetPipelines400Response", 253 '404': "GetPipelines400Response", 254 '500': "GetPipelines400Response", 255 } 256 response_data = self.api_client.call_api( 257 *_param, 258 _request_timeout=_request_timeout 259 ) 260 return response_data.response 261 262 263 def _get_extraction_result_serialize( 264 self, 265 organization, 266 extraction_id, 267 _request_auth, 268 _content_type, 269 _headers, 270 _host_index, 271 ) -> RequestSerialized: 272 273 _host = None 274 275 _collection_formats: Dict[str, str] = { 276 } 277 278 _path_params: Dict[str, str] = {} 279 _query_params: List[Tuple[str, str]] = [] 280 _header_params: Dict[str, Optional[str]] = _headers or {} 281 _form_params: List[Tuple[str, str]] = [] 282 _files: Dict[ 283 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 284 ] = {} 285 _body_params: Optional[bytes] = None 286 287 # process the path parameters 288 if organization is not None: 289 _path_params['organization'] = organization 290 if extraction_id is not None: 291 _path_params['extractionId'] = extraction_id 292 # process the query parameters 293 # process the header parameters 294 # process the form parameters 295 # process the body parameter 296 297 298 # set the HTTP header `Accept` 299 if 'Accept' not in _header_params: 300 _header_params['Accept'] = self.api_client.select_header_accept( 301 [ 302 'application/json' 303 ] 304 ) 305 306 307 # authentication setting 308 _auth_settings: List[str] = [ 309 'bearerAuth' 310 ] 311 312 return self.api_client.param_serialize( 313 method='GET', 314 resource_path='/org/{organization}/extraction/{extractionId}', 315 path_params=_path_params, 316 query_params=_query_params, 317 header_params=_header_params, 318 body=_body_params, 319 post_params=_form_params, 320 files=_files, 321 auth_settings=_auth_settings, 322 collection_formats=_collection_formats, 323 _host=_host, 324 _request_auth=_request_auth 325 ) 326 327 328 329 330 @validate_call 331 def start_extraction( 332 self, 333 organization: StrictStr, 334 start_extraction_request: StartExtractionRequest, 335 _request_timeout: Union[ 336 None, 337 Annotated[StrictFloat, Field(gt=0)], 338 Tuple[ 339 Annotated[StrictFloat, Field(gt=0)], 340 Annotated[StrictFloat, Field(gt=0)] 341 ] 342 ] = None, 343 _request_auth: Optional[Dict[StrictStr, Any]] = None, 344 _content_type: Optional[StrictStr] = None, 345 _headers: Optional[Dict[StrictStr, Any]] = None, 346 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 347 ) -> StartExtractionResponse: 348 """Start content extraction from a file 349 350 351 :param organization: (required) 352 :type organization: str 353 :param start_extraction_request: (required) 354 :type start_extraction_request: StartExtractionRequest 355 :param _request_timeout: timeout setting for this request. If one 356 number provided, it will be total request 357 timeout. It can also be a pair (tuple) of 358 (connection, read) timeouts. 359 :type _request_timeout: int, tuple(int, int), optional 360 :param _request_auth: set to override the auth_settings for an a single 361 request; this effectively ignores the 362 authentication in the spec for a single request. 363 :type _request_auth: dict, optional 364 :param _content_type: force content-type for the request. 365 :type _content_type: str, Optional 366 :param _headers: set to override the headers for a single 367 request; this effectively ignores the headers 368 in the spec for a single request. 369 :type _headers: dict, optional 370 :param _host_index: set to override the host_index for a single 371 request; this effectively ignores the host_index 372 in the spec for a single request. 373 :type _host_index: int, optional 374 :return: Returns the result object. 375 """ # noqa: E501 376 377 _param = self._start_extraction_serialize( 378 organization=organization, 379 start_extraction_request=start_extraction_request, 380 _request_auth=_request_auth, 381 _content_type=_content_type, 382 _headers=_headers, 383 _host_index=_host_index 384 ) 385 386 _response_types_map: Dict[str, Optional[str]] = { 387 '200': "StartExtractionResponse", 388 '400': "GetPipelines400Response", 389 '401': "GetPipelines400Response", 390 '403': "GetPipelines400Response", 391 '404': "GetPipelines400Response", 392 '500': "GetPipelines400Response", 393 } 394 response_data = self.api_client.call_api( 395 *_param, 396 _request_timeout=_request_timeout 397 ) 398 response_data.read() 399 return self.api_client.response_deserialize( 400 response_data=response_data, 401 response_types_map=_response_types_map, 402 ).data 403 404 405 @validate_call 406 def start_extraction_with_http_info( 407 self, 408 organization: StrictStr, 409 start_extraction_request: StartExtractionRequest, 410 _request_timeout: Union[ 411 None, 412 Annotated[StrictFloat, Field(gt=0)], 413 Tuple[ 414 Annotated[StrictFloat, Field(gt=0)], 415 Annotated[StrictFloat, Field(gt=0)] 416 ] 417 ] = None, 418 _request_auth: Optional[Dict[StrictStr, Any]] = None, 419 _content_type: Optional[StrictStr] = None, 420 _headers: Optional[Dict[StrictStr, Any]] = None, 421 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 422 ) -> ApiResponse[StartExtractionResponse]: 423 """Start content extraction from a file 424 425 426 :param organization: (required) 427 :type organization: str 428 :param start_extraction_request: (required) 429 :type start_extraction_request: StartExtractionRequest 430 :param _request_timeout: timeout setting for this request. If one 431 number provided, it will be total request 432 timeout. It can also be a pair (tuple) of 433 (connection, read) timeouts. 434 :type _request_timeout: int, tuple(int, int), optional 435 :param _request_auth: set to override the auth_settings for an a single 436 request; this effectively ignores the 437 authentication in the spec for a single request. 438 :type _request_auth: dict, optional 439 :param _content_type: force content-type for the request. 440 :type _content_type: str, Optional 441 :param _headers: set to override the headers for a single 442 request; this effectively ignores the headers 443 in the spec for a single request. 444 :type _headers: dict, optional 445 :param _host_index: set to override the host_index for a single 446 request; this effectively ignores the host_index 447 in the spec for a single request. 448 :type _host_index: int, optional 449 :return: Returns the result object. 450 """ # noqa: E501 451 452 _param = self._start_extraction_serialize( 453 organization=organization, 454 start_extraction_request=start_extraction_request, 455 _request_auth=_request_auth, 456 _content_type=_content_type, 457 _headers=_headers, 458 _host_index=_host_index 459 ) 460 461 _response_types_map: Dict[str, Optional[str]] = { 462 '200': "StartExtractionResponse", 463 '400': "GetPipelines400Response", 464 '401': "GetPipelines400Response", 465 '403': "GetPipelines400Response", 466 '404': "GetPipelines400Response", 467 '500': "GetPipelines400Response", 468 } 469 response_data = self.api_client.call_api( 470 *_param, 471 _request_timeout=_request_timeout 472 ) 473 response_data.read() 474 return self.api_client.response_deserialize( 475 response_data=response_data, 476 response_types_map=_response_types_map, 477 ) 478 479 480 @validate_call 481 def start_extraction_without_preload_content( 482 self, 483 organization: StrictStr, 484 start_extraction_request: StartExtractionRequest, 485 _request_timeout: Union[ 486 None, 487 Annotated[StrictFloat, Field(gt=0)], 488 Tuple[ 489 Annotated[StrictFloat, Field(gt=0)], 490 Annotated[StrictFloat, Field(gt=0)] 491 ] 492 ] = None, 493 _request_auth: Optional[Dict[StrictStr, Any]] = None, 494 _content_type: Optional[StrictStr] = None, 495 _headers: Optional[Dict[StrictStr, Any]] = None, 496 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 497 ) -> RESTResponseType: 498 """Start content extraction from a file 499 500 501 :param organization: (required) 502 :type organization: str 503 :param start_extraction_request: (required) 504 :type start_extraction_request: StartExtractionRequest 505 :param _request_timeout: timeout setting for this request. If one 506 number provided, it will be total request 507 timeout. It can also be a pair (tuple) of 508 (connection, read) timeouts. 509 :type _request_timeout: int, tuple(int, int), optional 510 :param _request_auth: set to override the auth_settings for an a single 511 request; this effectively ignores the 512 authentication in the spec for a single request. 513 :type _request_auth: dict, optional 514 :param _content_type: force content-type for the request. 515 :type _content_type: str, Optional 516 :param _headers: set to override the headers for a single 517 request; this effectively ignores the headers 518 in the spec for a single request. 519 :type _headers: dict, optional 520 :param _host_index: set to override the host_index for a single 521 request; this effectively ignores the host_index 522 in the spec for a single request. 523 :type _host_index: int, optional 524 :return: Returns the result object. 525 """ # noqa: E501 526 527 _param = self._start_extraction_serialize( 528 organization=organization, 529 start_extraction_request=start_extraction_request, 530 _request_auth=_request_auth, 531 _content_type=_content_type, 532 _headers=_headers, 533 _host_index=_host_index 534 ) 535 536 _response_types_map: Dict[str, Optional[str]] = { 537 '200': "StartExtractionResponse", 538 '400': "GetPipelines400Response", 539 '401': "GetPipelines400Response", 540 '403': "GetPipelines400Response", 541 '404': "GetPipelines400Response", 542 '500': "GetPipelines400Response", 543 } 544 response_data = self.api_client.call_api( 545 *_param, 546 _request_timeout=_request_timeout 547 ) 548 return response_data.response 549 550 551 def _start_extraction_serialize( 552 self, 553 organization, 554 start_extraction_request, 555 _request_auth, 556 _content_type, 557 _headers, 558 _host_index, 559 ) -> RequestSerialized: 560 561 _host = None 562 563 _collection_formats: Dict[str, str] = { 564 } 565 566 _path_params: Dict[str, str] = {} 567 _query_params: List[Tuple[str, str]] = [] 568 _header_params: Dict[str, Optional[str]] = _headers or {} 569 _form_params: List[Tuple[str, str]] = [] 570 _files: Dict[ 571 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 572 ] = {} 573 _body_params: Optional[bytes] = None 574 575 # process the path parameters 576 if organization is not None: 577 _path_params['organization'] = organization 578 # process the query parameters 579 # process the header parameters 580 # process the form parameters 581 # process the body parameter 582 if start_extraction_request is not None: 583 _body_params = start_extraction_request 584 585 586 # set the HTTP header `Accept` 587 if 'Accept' not in _header_params: 588 _header_params['Accept'] = self.api_client.select_header_accept( 589 [ 590 'application/json' 591 ] 592 ) 593 594 # set the HTTP header `Content-Type` 595 if _content_type: 596 _header_params['Content-Type'] = _content_type 597 else: 598 _default_content_type = ( 599 self.api_client.select_header_content_type( 600 [ 601 'application/json' 602 ] 603 ) 604 ) 605 if _default_content_type is not None: 606 _header_params['Content-Type'] = _default_content_type 607 608 # authentication setting 609 _auth_settings: List[str] = [ 610 'bearerAuth' 611 ] 612 613 return self.api_client.param_serialize( 614 method='POST', 615 resource_path='/org/{organization}/extraction', 616 path_params=_path_params, 617 query_params=_query_params, 618 header_params=_header_params, 619 body=_body_params, 620 post_params=_form_params, 621 files=_files, 622 auth_settings=_auth_settings, 623 collection_formats=_collection_formats, 624 _host=_host, 625 _request_auth=_request_auth 626 )
class
ExtractionApi:
30class ExtractionApi: 31 """NOTE: This class is auto generated by OpenAPI Generator 32 Ref: https://openapi-generator.tech 33 34 Do not edit the class manually. 35 """ 36 37 def __init__(self, api_client=None) -> None: 38 if api_client is None: 39 api_client = ApiClient.get_default() 40 self.api_client = api_client 41 42 43 @validate_call 44 def get_extraction_result( 45 self, 46 organization: StrictStr, 47 extraction_id: StrictStr, 48 _request_timeout: Union[ 49 None, 50 Annotated[StrictFloat, Field(gt=0)], 51 Tuple[ 52 Annotated[StrictFloat, Field(gt=0)], 53 Annotated[StrictFloat, Field(gt=0)] 54 ] 55 ] = None, 56 _request_auth: Optional[Dict[StrictStr, Any]] = None, 57 _content_type: Optional[StrictStr] = None, 58 _headers: Optional[Dict[StrictStr, Any]] = None, 59 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 60 ) -> ExtractionResultResponse: 61 """Get extraction result 62 63 64 :param organization: (required) 65 :type organization: str 66 :param extraction_id: (required) 67 :type extraction_id: str 68 :param _request_timeout: timeout setting for this request. If one 69 number provided, it will be total request 70 timeout. It can also be a pair (tuple) of 71 (connection, read) timeouts. 72 :type _request_timeout: int, tuple(int, int), optional 73 :param _request_auth: set to override the auth_settings for an a single 74 request; this effectively ignores the 75 authentication in the spec for a single request. 76 :type _request_auth: dict, optional 77 :param _content_type: force content-type for the request. 78 :type _content_type: str, Optional 79 :param _headers: set to override the headers for a single 80 request; this effectively ignores the headers 81 in the spec for a single request. 82 :type _headers: dict, optional 83 :param _host_index: set to override the host_index for a single 84 request; this effectively ignores the host_index 85 in the spec for a single request. 86 :type _host_index: int, optional 87 :return: Returns the result object. 88 """ # noqa: E501 89 90 _param = self._get_extraction_result_serialize( 91 organization=organization, 92 extraction_id=extraction_id, 93 _request_auth=_request_auth, 94 _content_type=_content_type, 95 _headers=_headers, 96 _host_index=_host_index 97 ) 98 99 _response_types_map: Dict[str, Optional[str]] = { 100 '200': "ExtractionResultResponse", 101 '400': "GetPipelines400Response", 102 '401': "GetPipelines400Response", 103 '403': "GetPipelines400Response", 104 '404': "GetPipelines400Response", 105 '500': "GetPipelines400Response", 106 } 107 response_data = self.api_client.call_api( 108 *_param, 109 _request_timeout=_request_timeout 110 ) 111 response_data.read() 112 return self.api_client.response_deserialize( 113 response_data=response_data, 114 response_types_map=_response_types_map, 115 ).data 116 117 118 @validate_call 119 def get_extraction_result_with_http_info( 120 self, 121 organization: StrictStr, 122 extraction_id: StrictStr, 123 _request_timeout: Union[ 124 None, 125 Annotated[StrictFloat, Field(gt=0)], 126 Tuple[ 127 Annotated[StrictFloat, Field(gt=0)], 128 Annotated[StrictFloat, Field(gt=0)] 129 ] 130 ] = None, 131 _request_auth: Optional[Dict[StrictStr, Any]] = None, 132 _content_type: Optional[StrictStr] = None, 133 _headers: Optional[Dict[StrictStr, Any]] = None, 134 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 135 ) -> ApiResponse[ExtractionResultResponse]: 136 """Get extraction result 137 138 139 :param organization: (required) 140 :type organization: str 141 :param extraction_id: (required) 142 :type extraction_id: str 143 :param _request_timeout: timeout setting for this request. If one 144 number provided, it will be total request 145 timeout. It can also be a pair (tuple) of 146 (connection, read) timeouts. 147 :type _request_timeout: int, tuple(int, int), optional 148 :param _request_auth: set to override the auth_settings for an a single 149 request; this effectively ignores the 150 authentication in the spec for a single request. 151 :type _request_auth: dict, optional 152 :param _content_type: force content-type for the request. 153 :type _content_type: str, Optional 154 :param _headers: set to override the headers for a single 155 request; this effectively ignores the headers 156 in the spec for a single request. 157 :type _headers: dict, optional 158 :param _host_index: set to override the host_index for a single 159 request; this effectively ignores the host_index 160 in the spec for a single request. 161 :type _host_index: int, optional 162 :return: Returns the result object. 163 """ # noqa: E501 164 165 _param = self._get_extraction_result_serialize( 166 organization=organization, 167 extraction_id=extraction_id, 168 _request_auth=_request_auth, 169 _content_type=_content_type, 170 _headers=_headers, 171 _host_index=_host_index 172 ) 173 174 _response_types_map: Dict[str, Optional[str]] = { 175 '200': "ExtractionResultResponse", 176 '400': "GetPipelines400Response", 177 '401': "GetPipelines400Response", 178 '403': "GetPipelines400Response", 179 '404': "GetPipelines400Response", 180 '500': "GetPipelines400Response", 181 } 182 response_data = self.api_client.call_api( 183 *_param, 184 _request_timeout=_request_timeout 185 ) 186 response_data.read() 187 return self.api_client.response_deserialize( 188 response_data=response_data, 189 response_types_map=_response_types_map, 190 ) 191 192 193 @validate_call 194 def get_extraction_result_without_preload_content( 195 self, 196 organization: StrictStr, 197 extraction_id: StrictStr, 198 _request_timeout: Union[ 199 None, 200 Annotated[StrictFloat, Field(gt=0)], 201 Tuple[ 202 Annotated[StrictFloat, Field(gt=0)], 203 Annotated[StrictFloat, Field(gt=0)] 204 ] 205 ] = None, 206 _request_auth: Optional[Dict[StrictStr, Any]] = None, 207 _content_type: Optional[StrictStr] = None, 208 _headers: Optional[Dict[StrictStr, Any]] = None, 209 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 210 ) -> RESTResponseType: 211 """Get extraction result 212 213 214 :param organization: (required) 215 :type organization: str 216 :param extraction_id: (required) 217 :type extraction_id: str 218 :param _request_timeout: timeout setting for this request. If one 219 number provided, it will be total request 220 timeout. It can also be a pair (tuple) of 221 (connection, read) timeouts. 222 :type _request_timeout: int, tuple(int, int), optional 223 :param _request_auth: set to override the auth_settings for an a single 224 request; this effectively ignores the 225 authentication in the spec for a single request. 226 :type _request_auth: dict, optional 227 :param _content_type: force content-type for the request. 228 :type _content_type: str, Optional 229 :param _headers: set to override the headers for a single 230 request; this effectively ignores the headers 231 in the spec for a single request. 232 :type _headers: dict, optional 233 :param _host_index: set to override the host_index for a single 234 request; this effectively ignores the host_index 235 in the spec for a single request. 236 :type _host_index: int, optional 237 :return: Returns the result object. 238 """ # noqa: E501 239 240 _param = self._get_extraction_result_serialize( 241 organization=organization, 242 extraction_id=extraction_id, 243 _request_auth=_request_auth, 244 _content_type=_content_type, 245 _headers=_headers, 246 _host_index=_host_index 247 ) 248 249 _response_types_map: Dict[str, Optional[str]] = { 250 '200': "ExtractionResultResponse", 251 '400': "GetPipelines400Response", 252 '401': "GetPipelines400Response", 253 '403': "GetPipelines400Response", 254 '404': "GetPipelines400Response", 255 '500': "GetPipelines400Response", 256 } 257 response_data = self.api_client.call_api( 258 *_param, 259 _request_timeout=_request_timeout 260 ) 261 return response_data.response 262 263 264 def _get_extraction_result_serialize( 265 self, 266 organization, 267 extraction_id, 268 _request_auth, 269 _content_type, 270 _headers, 271 _host_index, 272 ) -> RequestSerialized: 273 274 _host = None 275 276 _collection_formats: Dict[str, str] = { 277 } 278 279 _path_params: Dict[str, str] = {} 280 _query_params: List[Tuple[str, str]] = [] 281 _header_params: Dict[str, Optional[str]] = _headers or {} 282 _form_params: List[Tuple[str, str]] = [] 283 _files: Dict[ 284 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 285 ] = {} 286 _body_params: Optional[bytes] = None 287 288 # process the path parameters 289 if organization is not None: 290 _path_params['organization'] = organization 291 if extraction_id is not None: 292 _path_params['extractionId'] = extraction_id 293 # process the query parameters 294 # process the header parameters 295 # process the form parameters 296 # process the body parameter 297 298 299 # set the HTTP header `Accept` 300 if 'Accept' not in _header_params: 301 _header_params['Accept'] = self.api_client.select_header_accept( 302 [ 303 'application/json' 304 ] 305 ) 306 307 308 # authentication setting 309 _auth_settings: List[str] = [ 310 'bearerAuth' 311 ] 312 313 return self.api_client.param_serialize( 314 method='GET', 315 resource_path='/org/{organization}/extraction/{extractionId}', 316 path_params=_path_params, 317 query_params=_query_params, 318 header_params=_header_params, 319 body=_body_params, 320 post_params=_form_params, 321 files=_files, 322 auth_settings=_auth_settings, 323 collection_formats=_collection_formats, 324 _host=_host, 325 _request_auth=_request_auth 326 ) 327 328 329 330 331 @validate_call 332 def start_extraction( 333 self, 334 organization: StrictStr, 335 start_extraction_request: StartExtractionRequest, 336 _request_timeout: Union[ 337 None, 338 Annotated[StrictFloat, Field(gt=0)], 339 Tuple[ 340 Annotated[StrictFloat, Field(gt=0)], 341 Annotated[StrictFloat, Field(gt=0)] 342 ] 343 ] = None, 344 _request_auth: Optional[Dict[StrictStr, Any]] = None, 345 _content_type: Optional[StrictStr] = None, 346 _headers: Optional[Dict[StrictStr, Any]] = None, 347 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 348 ) -> StartExtractionResponse: 349 """Start content extraction from a file 350 351 352 :param organization: (required) 353 :type organization: str 354 :param start_extraction_request: (required) 355 :type start_extraction_request: StartExtractionRequest 356 :param _request_timeout: timeout setting for this request. If one 357 number provided, it will be total request 358 timeout. It can also be a pair (tuple) of 359 (connection, read) timeouts. 360 :type _request_timeout: int, tuple(int, int), optional 361 :param _request_auth: set to override the auth_settings for an a single 362 request; this effectively ignores the 363 authentication in the spec for a single request. 364 :type _request_auth: dict, optional 365 :param _content_type: force content-type for the request. 366 :type _content_type: str, Optional 367 :param _headers: set to override the headers for a single 368 request; this effectively ignores the headers 369 in the spec for a single request. 370 :type _headers: dict, optional 371 :param _host_index: set to override the host_index for a single 372 request; this effectively ignores the host_index 373 in the spec for a single request. 374 :type _host_index: int, optional 375 :return: Returns the result object. 376 """ # noqa: E501 377 378 _param = self._start_extraction_serialize( 379 organization=organization, 380 start_extraction_request=start_extraction_request, 381 _request_auth=_request_auth, 382 _content_type=_content_type, 383 _headers=_headers, 384 _host_index=_host_index 385 ) 386 387 _response_types_map: Dict[str, Optional[str]] = { 388 '200': "StartExtractionResponse", 389 '400': "GetPipelines400Response", 390 '401': "GetPipelines400Response", 391 '403': "GetPipelines400Response", 392 '404': "GetPipelines400Response", 393 '500': "GetPipelines400Response", 394 } 395 response_data = self.api_client.call_api( 396 *_param, 397 _request_timeout=_request_timeout 398 ) 399 response_data.read() 400 return self.api_client.response_deserialize( 401 response_data=response_data, 402 response_types_map=_response_types_map, 403 ).data 404 405 406 @validate_call 407 def start_extraction_with_http_info( 408 self, 409 organization: StrictStr, 410 start_extraction_request: StartExtractionRequest, 411 _request_timeout: Union[ 412 None, 413 Annotated[StrictFloat, Field(gt=0)], 414 Tuple[ 415 Annotated[StrictFloat, Field(gt=0)], 416 Annotated[StrictFloat, Field(gt=0)] 417 ] 418 ] = None, 419 _request_auth: Optional[Dict[StrictStr, Any]] = None, 420 _content_type: Optional[StrictStr] = None, 421 _headers: Optional[Dict[StrictStr, Any]] = None, 422 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 423 ) -> ApiResponse[StartExtractionResponse]: 424 """Start content extraction from a file 425 426 427 :param organization: (required) 428 :type organization: str 429 :param start_extraction_request: (required) 430 :type start_extraction_request: StartExtractionRequest 431 :param _request_timeout: timeout setting for this request. If one 432 number provided, it will be total request 433 timeout. It can also be a pair (tuple) of 434 (connection, read) timeouts. 435 :type _request_timeout: int, tuple(int, int), optional 436 :param _request_auth: set to override the auth_settings for an a single 437 request; this effectively ignores the 438 authentication in the spec for a single request. 439 :type _request_auth: dict, optional 440 :param _content_type: force content-type for the request. 441 :type _content_type: str, Optional 442 :param _headers: set to override the headers for a single 443 request; this effectively ignores the headers 444 in the spec for a single request. 445 :type _headers: dict, optional 446 :param _host_index: set to override the host_index for a single 447 request; this effectively ignores the host_index 448 in the spec for a single request. 449 :type _host_index: int, optional 450 :return: Returns the result object. 451 """ # noqa: E501 452 453 _param = self._start_extraction_serialize( 454 organization=organization, 455 start_extraction_request=start_extraction_request, 456 _request_auth=_request_auth, 457 _content_type=_content_type, 458 _headers=_headers, 459 _host_index=_host_index 460 ) 461 462 _response_types_map: Dict[str, Optional[str]] = { 463 '200': "StartExtractionResponse", 464 '400': "GetPipelines400Response", 465 '401': "GetPipelines400Response", 466 '403': "GetPipelines400Response", 467 '404': "GetPipelines400Response", 468 '500': "GetPipelines400Response", 469 } 470 response_data = self.api_client.call_api( 471 *_param, 472 _request_timeout=_request_timeout 473 ) 474 response_data.read() 475 return self.api_client.response_deserialize( 476 response_data=response_data, 477 response_types_map=_response_types_map, 478 ) 479 480 481 @validate_call 482 def start_extraction_without_preload_content( 483 self, 484 organization: StrictStr, 485 start_extraction_request: StartExtractionRequest, 486 _request_timeout: Union[ 487 None, 488 Annotated[StrictFloat, Field(gt=0)], 489 Tuple[ 490 Annotated[StrictFloat, Field(gt=0)], 491 Annotated[StrictFloat, Field(gt=0)] 492 ] 493 ] = None, 494 _request_auth: Optional[Dict[StrictStr, Any]] = None, 495 _content_type: Optional[StrictStr] = None, 496 _headers: Optional[Dict[StrictStr, Any]] = None, 497 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 498 ) -> RESTResponseType: 499 """Start content extraction from a file 500 501 502 :param organization: (required) 503 :type organization: str 504 :param start_extraction_request: (required) 505 :type start_extraction_request: StartExtractionRequest 506 :param _request_timeout: timeout setting for this request. If one 507 number provided, it will be total request 508 timeout. It can also be a pair (tuple) of 509 (connection, read) timeouts. 510 :type _request_timeout: int, tuple(int, int), optional 511 :param _request_auth: set to override the auth_settings for an a single 512 request; this effectively ignores the 513 authentication in the spec for a single request. 514 :type _request_auth: dict, optional 515 :param _content_type: force content-type for the request. 516 :type _content_type: str, Optional 517 :param _headers: set to override the headers for a single 518 request; this effectively ignores the headers 519 in the spec for a single request. 520 :type _headers: dict, optional 521 :param _host_index: set to override the host_index for a single 522 request; this effectively ignores the host_index 523 in the spec for a single request. 524 :type _host_index: int, optional 525 :return: Returns the result object. 526 """ # noqa: E501 527 528 _param = self._start_extraction_serialize( 529 organization=organization, 530 start_extraction_request=start_extraction_request, 531 _request_auth=_request_auth, 532 _content_type=_content_type, 533 _headers=_headers, 534 _host_index=_host_index 535 ) 536 537 _response_types_map: Dict[str, Optional[str]] = { 538 '200': "StartExtractionResponse", 539 '400': "GetPipelines400Response", 540 '401': "GetPipelines400Response", 541 '403': "GetPipelines400Response", 542 '404': "GetPipelines400Response", 543 '500': "GetPipelines400Response", 544 } 545 response_data = self.api_client.call_api( 546 *_param, 547 _request_timeout=_request_timeout 548 ) 549 return response_data.response 550 551 552 def _start_extraction_serialize( 553 self, 554 organization, 555 start_extraction_request, 556 _request_auth, 557 _content_type, 558 _headers, 559 _host_index, 560 ) -> RequestSerialized: 561 562 _host = None 563 564 _collection_formats: Dict[str, str] = { 565 } 566 567 _path_params: Dict[str, str] = {} 568 _query_params: List[Tuple[str, str]] = [] 569 _header_params: Dict[str, Optional[str]] = _headers or {} 570 _form_params: List[Tuple[str, str]] = [] 571 _files: Dict[ 572 str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] 573 ] = {} 574 _body_params: Optional[bytes] = None 575 576 # process the path parameters 577 if organization is not None: 578 _path_params['organization'] = organization 579 # process the query parameters 580 # process the header parameters 581 # process the form parameters 582 # process the body parameter 583 if start_extraction_request is not None: 584 _body_params = start_extraction_request 585 586 587 # set the HTTP header `Accept` 588 if 'Accept' not in _header_params: 589 _header_params['Accept'] = self.api_client.select_header_accept( 590 [ 591 'application/json' 592 ] 593 ) 594 595 # set the HTTP header `Content-Type` 596 if _content_type: 597 _header_params['Content-Type'] = _content_type 598 else: 599 _default_content_type = ( 600 self.api_client.select_header_content_type( 601 [ 602 'application/json' 603 ] 604 ) 605 ) 606 if _default_content_type is not None: 607 _header_params['Content-Type'] = _default_content_type 608 609 # authentication setting 610 _auth_settings: List[str] = [ 611 'bearerAuth' 612 ] 613 614 return self.api_client.param_serialize( 615 method='POST', 616 resource_path='/org/{organization}/extraction', 617 path_params=_path_params, 618 query_params=_query_params, 619 header_params=_header_params, 620 body=_body_params, 621 post_params=_form_params, 622 files=_files, 623 auth_settings=_auth_settings, 624 collection_formats=_collection_formats, 625 _host=_host, 626 _request_auth=_request_auth 627 )
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
@validate_call
def
get_extraction_result( self, organization: typing.Annotated[str, Strict(strict=True)], extraction_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.models.extraction_result_response.ExtractionResultResponse:
43 @validate_call 44 def get_extraction_result( 45 self, 46 organization: StrictStr, 47 extraction_id: StrictStr, 48 _request_timeout: Union[ 49 None, 50 Annotated[StrictFloat, Field(gt=0)], 51 Tuple[ 52 Annotated[StrictFloat, Field(gt=0)], 53 Annotated[StrictFloat, Field(gt=0)] 54 ] 55 ] = None, 56 _request_auth: Optional[Dict[StrictStr, Any]] = None, 57 _content_type: Optional[StrictStr] = None, 58 _headers: Optional[Dict[StrictStr, Any]] = None, 59 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 60 ) -> ExtractionResultResponse: 61 """Get extraction result 62 63 64 :param organization: (required) 65 :type organization: str 66 :param extraction_id: (required) 67 :type extraction_id: str 68 :param _request_timeout: timeout setting for this request. If one 69 number provided, it will be total request 70 timeout. It can also be a pair (tuple) of 71 (connection, read) timeouts. 72 :type _request_timeout: int, tuple(int, int), optional 73 :param _request_auth: set to override the auth_settings for an a single 74 request; this effectively ignores the 75 authentication in the spec for a single request. 76 :type _request_auth: dict, optional 77 :param _content_type: force content-type for the request. 78 :type _content_type: str, Optional 79 :param _headers: set to override the headers for a single 80 request; this effectively ignores the headers 81 in the spec for a single request. 82 :type _headers: dict, optional 83 :param _host_index: set to override the host_index for a single 84 request; this effectively ignores the host_index 85 in the spec for a single request. 86 :type _host_index: int, optional 87 :return: Returns the result object. 88 """ # noqa: E501 89 90 _param = self._get_extraction_result_serialize( 91 organization=organization, 92 extraction_id=extraction_id, 93 _request_auth=_request_auth, 94 _content_type=_content_type, 95 _headers=_headers, 96 _host_index=_host_index 97 ) 98 99 _response_types_map: Dict[str, Optional[str]] = { 100 '200': "ExtractionResultResponse", 101 '400': "GetPipelines400Response", 102 '401': "GetPipelines400Response", 103 '403': "GetPipelines400Response", 104 '404': "GetPipelines400Response", 105 '500': "GetPipelines400Response", 106 } 107 response_data = self.api_client.call_api( 108 *_param, 109 _request_timeout=_request_timeout 110 ) 111 response_data.read() 112 return self.api_client.response_deserialize( 113 response_data=response_data, 114 response_types_map=_response_types_map, 115 ).data
Get extraction result
Parameters
- organization: (required)
- extraction_id: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
@validate_call
def
get_extraction_result_with_http_info( self, organization: typing.Annotated[str, Strict(strict=True)], extraction_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.api_response.ApiResponse[ExtractionResultResponse]:
118 @validate_call 119 def get_extraction_result_with_http_info( 120 self, 121 organization: StrictStr, 122 extraction_id: StrictStr, 123 _request_timeout: Union[ 124 None, 125 Annotated[StrictFloat, Field(gt=0)], 126 Tuple[ 127 Annotated[StrictFloat, Field(gt=0)], 128 Annotated[StrictFloat, Field(gt=0)] 129 ] 130 ] = None, 131 _request_auth: Optional[Dict[StrictStr, Any]] = None, 132 _content_type: Optional[StrictStr] = None, 133 _headers: Optional[Dict[StrictStr, Any]] = None, 134 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 135 ) -> ApiResponse[ExtractionResultResponse]: 136 """Get extraction result 137 138 139 :param organization: (required) 140 :type organization: str 141 :param extraction_id: (required) 142 :type extraction_id: str 143 :param _request_timeout: timeout setting for this request. If one 144 number provided, it will be total request 145 timeout. It can also be a pair (tuple) of 146 (connection, read) timeouts. 147 :type _request_timeout: int, tuple(int, int), optional 148 :param _request_auth: set to override the auth_settings for an a single 149 request; this effectively ignores the 150 authentication in the spec for a single request. 151 :type _request_auth: dict, optional 152 :param _content_type: force content-type for the request. 153 :type _content_type: str, Optional 154 :param _headers: set to override the headers for a single 155 request; this effectively ignores the headers 156 in the spec for a single request. 157 :type _headers: dict, optional 158 :param _host_index: set to override the host_index for a single 159 request; this effectively ignores the host_index 160 in the spec for a single request. 161 :type _host_index: int, optional 162 :return: Returns the result object. 163 """ # noqa: E501 164 165 _param = self._get_extraction_result_serialize( 166 organization=organization, 167 extraction_id=extraction_id, 168 _request_auth=_request_auth, 169 _content_type=_content_type, 170 _headers=_headers, 171 _host_index=_host_index 172 ) 173 174 _response_types_map: Dict[str, Optional[str]] = { 175 '200': "ExtractionResultResponse", 176 '400': "GetPipelines400Response", 177 '401': "GetPipelines400Response", 178 '403': "GetPipelines400Response", 179 '404': "GetPipelines400Response", 180 '500': "GetPipelines400Response", 181 } 182 response_data = self.api_client.call_api( 183 *_param, 184 _request_timeout=_request_timeout 185 ) 186 response_data.read() 187 return self.api_client.response_deserialize( 188 response_data=response_data, 189 response_types_map=_response_types_map, 190 )
Get extraction result
Parameters
- organization: (required)
- extraction_id: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
@validate_call
def
get_extraction_result_without_preload_content( self, organization: typing.Annotated[str, Strict(strict=True)], extraction_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> urllib3.response.HTTPResponse:
193 @validate_call 194 def get_extraction_result_without_preload_content( 195 self, 196 organization: StrictStr, 197 extraction_id: StrictStr, 198 _request_timeout: Union[ 199 None, 200 Annotated[StrictFloat, Field(gt=0)], 201 Tuple[ 202 Annotated[StrictFloat, Field(gt=0)], 203 Annotated[StrictFloat, Field(gt=0)] 204 ] 205 ] = None, 206 _request_auth: Optional[Dict[StrictStr, Any]] = None, 207 _content_type: Optional[StrictStr] = None, 208 _headers: Optional[Dict[StrictStr, Any]] = None, 209 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 210 ) -> RESTResponseType: 211 """Get extraction result 212 213 214 :param organization: (required) 215 :type organization: str 216 :param extraction_id: (required) 217 :type extraction_id: str 218 :param _request_timeout: timeout setting for this request. If one 219 number provided, it will be total request 220 timeout. It can also be a pair (tuple) of 221 (connection, read) timeouts. 222 :type _request_timeout: int, tuple(int, int), optional 223 :param _request_auth: set to override the auth_settings for an a single 224 request; this effectively ignores the 225 authentication in the spec for a single request. 226 :type _request_auth: dict, optional 227 :param _content_type: force content-type for the request. 228 :type _content_type: str, Optional 229 :param _headers: set to override the headers for a single 230 request; this effectively ignores the headers 231 in the spec for a single request. 232 :type _headers: dict, optional 233 :param _host_index: set to override the host_index for a single 234 request; this effectively ignores the host_index 235 in the spec for a single request. 236 :type _host_index: int, optional 237 :return: Returns the result object. 238 """ # noqa: E501 239 240 _param = self._get_extraction_result_serialize( 241 organization=organization, 242 extraction_id=extraction_id, 243 _request_auth=_request_auth, 244 _content_type=_content_type, 245 _headers=_headers, 246 _host_index=_host_index 247 ) 248 249 _response_types_map: Dict[str, Optional[str]] = { 250 '200': "ExtractionResultResponse", 251 '400': "GetPipelines400Response", 252 '401': "GetPipelines400Response", 253 '403': "GetPipelines400Response", 254 '404': "GetPipelines400Response", 255 '500': "GetPipelines400Response", 256 } 257 response_data = self.api_client.call_api( 258 *_param, 259 _request_timeout=_request_timeout 260 ) 261 return response_data.response
Get extraction result
Parameters
- organization: (required)
- extraction_id: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
@validate_call
def
start_extraction( self, organization: typing.Annotated[str, Strict(strict=True)], start_extraction_request: vectorize_client.models.start_extraction_request.StartExtractionRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.models.start_extraction_response.StartExtractionResponse:
331 @validate_call 332 def start_extraction( 333 self, 334 organization: StrictStr, 335 start_extraction_request: StartExtractionRequest, 336 _request_timeout: Union[ 337 None, 338 Annotated[StrictFloat, Field(gt=0)], 339 Tuple[ 340 Annotated[StrictFloat, Field(gt=0)], 341 Annotated[StrictFloat, Field(gt=0)] 342 ] 343 ] = None, 344 _request_auth: Optional[Dict[StrictStr, Any]] = None, 345 _content_type: Optional[StrictStr] = None, 346 _headers: Optional[Dict[StrictStr, Any]] = None, 347 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 348 ) -> StartExtractionResponse: 349 """Start content extraction from a file 350 351 352 :param organization: (required) 353 :type organization: str 354 :param start_extraction_request: (required) 355 :type start_extraction_request: StartExtractionRequest 356 :param _request_timeout: timeout setting for this request. If one 357 number provided, it will be total request 358 timeout. It can also be a pair (tuple) of 359 (connection, read) timeouts. 360 :type _request_timeout: int, tuple(int, int), optional 361 :param _request_auth: set to override the auth_settings for an a single 362 request; this effectively ignores the 363 authentication in the spec for a single request. 364 :type _request_auth: dict, optional 365 :param _content_type: force content-type for the request. 366 :type _content_type: str, Optional 367 :param _headers: set to override the headers for a single 368 request; this effectively ignores the headers 369 in the spec for a single request. 370 :type _headers: dict, optional 371 :param _host_index: set to override the host_index for a single 372 request; this effectively ignores the host_index 373 in the spec for a single request. 374 :type _host_index: int, optional 375 :return: Returns the result object. 376 """ # noqa: E501 377 378 _param = self._start_extraction_serialize( 379 organization=organization, 380 start_extraction_request=start_extraction_request, 381 _request_auth=_request_auth, 382 _content_type=_content_type, 383 _headers=_headers, 384 _host_index=_host_index 385 ) 386 387 _response_types_map: Dict[str, Optional[str]] = { 388 '200': "StartExtractionResponse", 389 '400': "GetPipelines400Response", 390 '401': "GetPipelines400Response", 391 '403': "GetPipelines400Response", 392 '404': "GetPipelines400Response", 393 '500': "GetPipelines400Response", 394 } 395 response_data = self.api_client.call_api( 396 *_param, 397 _request_timeout=_request_timeout 398 ) 399 response_data.read() 400 return self.api_client.response_deserialize( 401 response_data=response_data, 402 response_types_map=_response_types_map, 403 ).data
Start content extraction from a file
Parameters
- organization: (required)
- start_extraction_request: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
@validate_call
def
start_extraction_with_http_info( self, organization: typing.Annotated[str, Strict(strict=True)], start_extraction_request: vectorize_client.models.start_extraction_request.StartExtractionRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.api_response.ApiResponse[StartExtractionResponse]:
406 @validate_call 407 def start_extraction_with_http_info( 408 self, 409 organization: StrictStr, 410 start_extraction_request: StartExtractionRequest, 411 _request_timeout: Union[ 412 None, 413 Annotated[StrictFloat, Field(gt=0)], 414 Tuple[ 415 Annotated[StrictFloat, Field(gt=0)], 416 Annotated[StrictFloat, Field(gt=0)] 417 ] 418 ] = None, 419 _request_auth: Optional[Dict[StrictStr, Any]] = None, 420 _content_type: Optional[StrictStr] = None, 421 _headers: Optional[Dict[StrictStr, Any]] = None, 422 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 423 ) -> ApiResponse[StartExtractionResponse]: 424 """Start content extraction from a file 425 426 427 :param organization: (required) 428 :type organization: str 429 :param start_extraction_request: (required) 430 :type start_extraction_request: StartExtractionRequest 431 :param _request_timeout: timeout setting for this request. If one 432 number provided, it will be total request 433 timeout. It can also be a pair (tuple) of 434 (connection, read) timeouts. 435 :type _request_timeout: int, tuple(int, int), optional 436 :param _request_auth: set to override the auth_settings for an a single 437 request; this effectively ignores the 438 authentication in the spec for a single request. 439 :type _request_auth: dict, optional 440 :param _content_type: force content-type for the request. 441 :type _content_type: str, Optional 442 :param _headers: set to override the headers for a single 443 request; this effectively ignores the headers 444 in the spec for a single request. 445 :type _headers: dict, optional 446 :param _host_index: set to override the host_index for a single 447 request; this effectively ignores the host_index 448 in the spec for a single request. 449 :type _host_index: int, optional 450 :return: Returns the result object. 451 """ # noqa: E501 452 453 _param = self._start_extraction_serialize( 454 organization=organization, 455 start_extraction_request=start_extraction_request, 456 _request_auth=_request_auth, 457 _content_type=_content_type, 458 _headers=_headers, 459 _host_index=_host_index 460 ) 461 462 _response_types_map: Dict[str, Optional[str]] = { 463 '200': "StartExtractionResponse", 464 '400': "GetPipelines400Response", 465 '401': "GetPipelines400Response", 466 '403': "GetPipelines400Response", 467 '404': "GetPipelines400Response", 468 '500': "GetPipelines400Response", 469 } 470 response_data = self.api_client.call_api( 471 *_param, 472 _request_timeout=_request_timeout 473 ) 474 response_data.read() 475 return self.api_client.response_deserialize( 476 response_data=response_data, 477 response_types_map=_response_types_map, 478 )
Start content extraction from a file
Parameters
- organization: (required)
- start_extraction_request: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.
@validate_call
def
start_extraction_without_preload_content( self, organization: typing.Annotated[str, Strict(strict=True)], start_extraction_request: vectorize_client.models.start_extraction_request.StartExtractionRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> urllib3.response.HTTPResponse:
481 @validate_call 482 def start_extraction_without_preload_content( 483 self, 484 organization: StrictStr, 485 start_extraction_request: StartExtractionRequest, 486 _request_timeout: Union[ 487 None, 488 Annotated[StrictFloat, Field(gt=0)], 489 Tuple[ 490 Annotated[StrictFloat, Field(gt=0)], 491 Annotated[StrictFloat, Field(gt=0)] 492 ] 493 ] = None, 494 _request_auth: Optional[Dict[StrictStr, Any]] = None, 495 _content_type: Optional[StrictStr] = None, 496 _headers: Optional[Dict[StrictStr, Any]] = None, 497 _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, 498 ) -> RESTResponseType: 499 """Start content extraction from a file 500 501 502 :param organization: (required) 503 :type organization: str 504 :param start_extraction_request: (required) 505 :type start_extraction_request: StartExtractionRequest 506 :param _request_timeout: timeout setting for this request. If one 507 number provided, it will be total request 508 timeout. It can also be a pair (tuple) of 509 (connection, read) timeouts. 510 :type _request_timeout: int, tuple(int, int), optional 511 :param _request_auth: set to override the auth_settings for an a single 512 request; this effectively ignores the 513 authentication in the spec for a single request. 514 :type _request_auth: dict, optional 515 :param _content_type: force content-type for the request. 516 :type _content_type: str, Optional 517 :param _headers: set to override the headers for a single 518 request; this effectively ignores the headers 519 in the spec for a single request. 520 :type _headers: dict, optional 521 :param _host_index: set to override the host_index for a single 522 request; this effectively ignores the host_index 523 in the spec for a single request. 524 :type _host_index: int, optional 525 :return: Returns the result object. 526 """ # noqa: E501 527 528 _param = self._start_extraction_serialize( 529 organization=organization, 530 start_extraction_request=start_extraction_request, 531 _request_auth=_request_auth, 532 _content_type=_content_type, 533 _headers=_headers, 534 _host_index=_host_index 535 ) 536 537 _response_types_map: Dict[str, Optional[str]] = { 538 '200': "StartExtractionResponse", 539 '400': "GetPipelines400Response", 540 '401': "GetPipelines400Response", 541 '403': "GetPipelines400Response", 542 '404': "GetPipelines400Response", 543 '500': "GetPipelines400Response", 544 } 545 response_data = self.api_client.call_api( 546 *_param, 547 _request_timeout=_request_timeout 548 ) 549 return response_data.response
Start content extraction from a file
Parameters
- organization: (required)
- start_extraction_request: (required)
- _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
- _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
- _content_type: force content-type for the request.
- _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
- _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns
Returns the result object.