asposeocrcloud/api/ocr_api.py
def __post_recognize_from_content(self, file_path, query_params, **kwargs):
        assert file_path is not None
        """ Recognize image text from content - provide local filepath to send it in Aspose.OCR Cloud directly

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        :param bool async_req: Asynchronous request
        :param str file_path: Local file path to send on recognition
        :return: OCRResponse . If the method is called asynchronously, returns the request thread.
        """

        all_params = ['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_convert_document_to_image" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}
        path_params = {}  # uri params #

        query_params = query_params.__dict__
        print(query_params)
        # query_params = {"skewCorrect": False}  # content query params

        header_params = {}
        form_params = {}
        local_var_files = {}
        # local_var_files = {"File": file_path}
        body_params = []

        with open(file_path, 'rb') as f:
            data = f.read()
            body_params = data

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(
            ['application/octet-stream'])

        return self.api_client.call_api('/ocr/recognize', 'POST', path_params, query_params, header_params,
                                        body=body_params, post_params=form_params, files=local_var_files,
                                        response_type='OcrResponse', async_req=params.get('async_req'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        collection_formats=collection_formats,
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'))
 Recognize image text from content - provide local filepath to send it in Aspose.OCR Cloud directly

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        :param bool async_req: Asynchronous request
        :param str file_path: Local file path to send on recognition
        :return: OCRResponse . If the method is called asynchronously, returns the request thread.
        
Recognize image text from content - provide local filepath to send it in Aspose.OCR Cloud directly
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
Recognize image text from content - provide local filepath to send it in Aspose . OCR Cloud directly This method makes a synchronous HTTP request by default . To make an asynchronous HTTP request please pass async_req = True
def __post_recognize_from_content(self, file_path, query_params, **kwargs):
        assert file_path is not None
        all_params = ['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']
        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_convert_document_to_image" % key
                )
            params[key] = val
        del params['kwargs']
        collection_formats = {}
        path_params = {}  
        query_params = query_params.__dict__
        print(query_params)
        header_params = {}
        form_params = {}
        local_var_files = {}
        body_params = []
        with open(file_path, 'rb') as f:
            data = f.read()
            body_params = data
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])
        header_params['Content-Type'] = self.api_client.select_header_content_type(
            ['application/octet-stream'])
        return self.api_client.call_api('/ocr/recognize', 'POST', path_params, query_params, header_params,
                                        body=body_params, post_params=form_params, files=local_var_files,
                                        response_type='OcrResponse', async_req=params.get('async_req'),
                                        _return_http_data_only=params.get('_return_http_data_only'),
                                        collection_formats=collection_formats,
                                        _preload_content=params.get('_preload_content', True),
                                        _request_timeout=params.get('_request_timeout'))
def __post_recognize_from_content ( self , file_path , query_params , ** kwargs ) : assert file_path is not None all_params = [ 'async_req' , '_return_http_data_only' , '_preload_content' , '_request_timeout' ] params = locals ( ) for key , val in six . iteritems ( params [ 'kwargs' ] ) : if key not in all_params : raise TypeError ( "Got an unexpected keyword argument '%s'" " to method get_convert_document_to_image" % key ) params [ key ] = val del params [ 'kwargs' ] collection_formats = { } path_params = { } query_params = query_params . __dict__ print ( query_params ) header_params = { } form_params = { } local_var_files = { } body_params = [ ] with open ( file_path , 'rb' ) as f : data = f . read ( ) body_params = data header_params [ 'Accept' ] = self . api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = self . api_client . select_header_content_type ( [ 'application/octet-stream' ] ) return self . api_client . call_api ( '/ocr/recognize' , 'POST' , path_params , query_params , header_params , body = body_params , post_params = form_params , files = local_var_files , response_type = 'OcrResponse' , async_req = params . get ( 'async_req' ) , _return_http_data_only = params . get ( '_return_http_data_only' ) , collection_formats = collection_formats , _preload_content = params . get ( '_preload_content' , True ) , _request_timeout = params . get ( '_request_timeout' ) )
Recognize image text from content - provide local filepath to send it in Aspose.OCR Cloud directly
This method makes a synchronous HTTP request by default.
Recognize image text from content - provide local filepath to send it in Aspose . OCR Cloud directly This method makes a synchronous HTTP request by default .
""" Recognize image text from content - provide local filepath to send it in Aspose.OCR Cloud directly

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        :param bool async_req: Asynchronous request
        :param str file_path: Local file path to send on recognition
        :return: OCRResponse . If the method is called asynchronously, returns the request thread.
        """ # uri params # # query_params = {"skewCorrect": False}  # content query params # local_var_files = {"File": file_path} # HTTP header `Accept` # HTTP header `Content-Type`
OCRResponse . If the method is called asynchronously, returns the request thread.
OCRResponse . If the method is called asynchronously returns the request thread .
self
file_path
Local file path to send on recognition
Local file path to send on recognition
query_params
async_req
None