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