Package: cloudmersive-ocr-api-client
cloudmersive_ocr_api_clientThe powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.This Python package provides a native API client forCloudmersive OCRAPI version: v1Package version: 4.0.1Build package: io.swagger.codegen.languages.PythonClientCodegenRequirements.Python 2.7 and 3.4+Installation & Usagepip installIf the python package is hosted on Github, you can install directly from Githubpipinstallgit+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)Then import the package:importcloudmersive_ocr_api_clientSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importcloudmersive_ocr_api_clientGetting StartedPlease follow theinstallation procedureand then run the following:from__future__importprint_functionimporttimeimportcloudmersive_ocr_api_clientfromcloudmersive_ocr_api_client.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: Apikeyconfiguration=cloudmersive_ocr_api_client.Configuration()configuration.api_key['Apikey']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance=cloudmersive_ocr_api_client.ImageOcrApi(cloudmersive_ocr_api_client.ApiClient(configuration))image_file='/path/to/file.txt'# file | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.language='language_example'# str | Optional, language of the input document, default is English (ENG).  Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish) (optional)preprocessing='preprocessing_example'# str | Optional, preprocessing mode, default is 'Auto'.  Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended). (optional)try:# Convert a scanned image into words with locationapi_response=api_instance.image_ocr_image_lines_with_location(image_file,language=language,preprocessing=preprocessing)pprint(api_response)exceptApiExceptionase:print("Exception when calling ImageOcrApi->image_ocr_image_lines_with_location:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://api.cloudmersive.comClassMethodHTTP requestDescriptionImageOcrApiimage_ocr_image_lines_with_locationPOST/ocr/image/to/lines-with-locationConvert a scanned image into words with locationImageOcrApiimage_ocr_image_words_with_locationPOST/ocr/image/to/words-with-locationConvert a scanned image into words with locationImageOcrApiimage_ocr_photo_recognize_business_cardPOST/ocr/photo/recognize/business-cardRecognize a photo of a business card, extract key business informationImageOcrApiimage_ocr_photo_recognize_formPOST/ocr/photo/recognize/formRecognize a photo of a form, extract key fields and business informationImageOcrApiimage_ocr_photo_recognize_form_advancedPOST/ocr/photo/recognize/form/advancedRecognize a photo of a form, extract key fields using stored templatesImageOcrApiimage_ocr_photo_recognize_receiptPOST/ocr/photo/recognize/receiptRecognize a photo of a receipt, extract key business informationImageOcrApiimage_ocr_photo_to_textPOST/ocr/photo/toTextConvert a photo of a document into textImageOcrApiimage_ocr_photo_words_with_locationPOST/ocr/photo/to/words-with-locationConvert a photo of a document or receipt into words with locationImageOcrApiimage_ocr_postPOST/ocr/image/toTextConvert a scanned image into textPdfOcrApipdf_ocr_get_async_job_statusGET/ocr/pdf/get-job-statusReturns the result of the Async Job - possible states can be STARTED or COMPLETEDPdfOcrApipdf_ocr_pdf_to_lines_with_locationPOST/ocr/pdf/to/lines-with-locationConvert a PDF into text lines with locationPdfOcrApipdf_ocr_pdf_to_words_with_locationPOST/ocr/pdf/to/words-with-locationConvert a PDF into words with locationPdfOcrApipdf_ocr_postPOST/ocr/pdf/toTextConverts an uploaded PDF file into text via Optical Character Recognition.PreprocessingApipreprocessing_binarizePOST/ocr/preprocessing/image/binarizeConvert an image of text into a binarized (light and dark) viewPreprocessingApipreprocessing_binarize_advancedPOST/ocr/preprocessing/image/binarize/advancedConvert an image of text into a binary (light and dark) view with MLPreprocessingApipreprocessing_get_page_anglePOST/ocr/preprocessing/image/get-page-angleGet the angle of the page / document / receiptPreprocessingApipreprocessing_unrotatePOST/ocr/preprocessing/image/unrotateDetect and unrotate a document imagePreprocessingApipreprocessing_unrotate_advancedPOST/ocr/preprocessing/image/unrotate/advancedDetect and unrotate a document image (advanced)PreprocessingApipreprocessing_unskewPOST/ocr/preprocessing/image/unskewDetect and unskew a photo of a documentReceiptsApireceipts_photo_to_csvPOST/ocr/receipts/photo/to/csvConvert a photo of a receipt into a CSV file containing structured information from the receiptDocumentation For ModelsBusinessCardRecognitionResultFieldResultFormDefinitionTemplateFormFieldDefinitionFormRecognitionResultFormTableColumnDefinitionFormTableDefinitionGetPageAngleResultImageToLinesWithLocationResultImageToTextResponseImageToWordsWithLocationResultOcrLineElementOcrPageResultOcrPageResultWithLinesWithLocationOcrPageResultWithWordsWithLocationOcrPhotoTextElementOcrWordElementPdfToLinesWithLocationResultPdfToTextResponsePdfToWordsWithLocationResultPhotoToWordsWithLocationResultPointReceiptLineItemReceiptRecognitionResultTableCellResultTableResultTableRowResultDocumentation For AuthorizationApikeyType: API keyAPI key parameter name: ApikeyLocation: HTTP headerAuthor