# Aspose.OCR Cloud for Python SDK 24.11.0
![PyPI](https://img.shields.io/pypi/v/aspose-ocr-cloud) ![PyPI - Format](https://img.shields.io/pypi/format/aspose-ocr-cloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/aspose-ocr-cloud) [![GitHub license](https://img.shields.io/github/license/aspose-ocr-cloud/aspose-ocr-cloud-python)](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-python/blob/master/LICENSE)
[Aspose.OCR Cloud](https://products.aspose.cloud/ocr/) is an optical character recognition as a service. With it, you can easily add OCR functionality to almost any device or platform, including netbooks, mini PCs, or even entry-level smartphones.
Our engine can read text from images, photos, screenshots and scanned PDFs in a wide variety of European, Cyrillic and Oriental fonts, returning results in the most popular document formats. Powerful built-in image processing filters based on neural networks automatically correct skewed and distorted images, automatically remove dirt, smudges, scratches, glare and other image defects that can affect recognition accuracy. To further improve the results, Aspose.OCR Cloud has a built-in spell checker that automatically replaces misspelled words and saves you the trouble of manually correcting the recognition results.
Even the complex recognition tasks can be done with a couple of API calls. To make interacting with Aspose.OCR Cloud services from Python applications even easier, we provide the software development kit (SDK) for Python. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple classes.
Aspose.OCR Cloud SDK for Python is open source under the MIT license. You can freely use it for any projects, including commercial and proprietary applications, as well as modify any part of its code.
## Try Online
[Image to Text](https://products.aspose.app/ocr/scan-image) | [Image to Searchable PDF](https://products.aspose.app/ocr/ocr-to-pdf) | [PDF OCR](https://products.aspose.app/ocr/pdf-ocr)| [Receipt Scanner](https://products.aspose.app/ocr/scan-receipt)
:---: | :---: | :---:| :---:
[![Scan Image](https://products.aspose.app/ocr/scan-image/img/ocr-recognize-48.png)](https://products.aspose.app/ocr/scan-image) | [![Image to Searchable PDF](https://products.aspose.app/ocr/scan-image/img/ocr-to-pdf-4-48.png)](https://products.aspose.app/ocr/ocr-to-pdf) | [![PDF OCR](https://products.aspose.app/ocr/scan-image/img/ocr-to-pdf-2-48.png)](https://products.aspose.app/ocr/pdf-ocr) | [![Receipt Scanner](https://products.aspose.app/ocr/scan-image/img/aspose-scan-receipt-48.png)](https://products.aspose.app/ocr/scan-receipt)
## What was changed in version 24.11.0
A summary of recent changes, enhancements and bug fixes in **Aspose.OCR Cloud SDK for Java 24.11.0** release:
Key | Summary | Category
--- | ------- | --------
OCR-3977 | Added recognition of the Uyghur language, including mixed Uyghur/English texts. | New feature
OCR-3978 | Added recognition of the Telugu language, including mixed Telugu/English texts. | New feature
OCR-3979 | Added recognition of the Kannada language, including mixed Kannada/English texts. | New feature
OCR-3980 | Added recognition of the Tamil language, including mixed Tamil/English texts. | New feature
OCR-3985 | Added recognition of the Devanagari-based scripts, including mixed Devanagari/English texts. | New feature
OCR-3986 | Added support for mixed Arabic/English texts. | Enhancement
OCR-3984 | Added support for mixed Japanese/English texts. | Enhancement
OCR-3983 | Added support for mixed Korean/English texts. | Enhancement
OCR-3982 | Added support for mixed Chinese/English texts. | Enhancement
OCR-3987 | Added support for mixed Persian/English texts. | Enhancement
REST API changes: https://releases.aspose.cloud/ocr/release-notes/2024/aspose-ocr-cloud-24-11-0-release-notes/
#### New recognition languages
The following recognition languages have been added:
Script | REST API
---------- | --------
Uyghur | `Language.Uyghur`
Telugu | `Language.Telugu`
Kannada | `Language.Kannada`
Tamil | `Language.Tamil`
Devanagari-based languages | `Language.Devanagari`
All of the OCR languages mentioned above also support the recognition of mixed texts, including those with Latin characters.
### Mixed language support
Aspose.OCR Cloud now supports the recognition of texts which include both native and Latin characters for the following languages:
- Arabic (`Language.Arabic`)
- Chinese (`Language.Chinese`)
- Japanese (`Language.Japanese`)
- Korean (`Language.Korean`)
- Persian (`Language.Persian`)
#### Updated public APIs:
_No changes_
#### Removed public APIs:
_No changes._
## Quickstart
Make your solution using [SDK](#asposeocr-cloud-sdks), follow these steps:
#### 1. Get API keys if you haven't
Make a personal account on [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/) and click _Get Keys_. These keys are useful for all Aspose Cloud products. If you have any trouble, look at this [detailed manual](https://docs.aspose.cloud/total/create-new-app-and-get-app-key-and-sid/).
#### 2. Run Demo
* Checkout the SDK or get from [pip](https://pypi.org/project/aspose-ocr-cloud/) (pip install aspose-ocr-cloud)
* Set Your AppSid & AppKey
* Run Python console [Demo](./Example/run.py)
<p align="center">
<a title="Download ZIP" href="https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-python/archive/master.zip">
<img src="testdata/download.png" />
</a>
</p>
---------------------------
## OCR in Python
```python
# Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
with aspose_ocr_cloud.ApiClient(config) as api_client:
# Create an instance of the API class
api_instance = recognize_image_api.RecognizeImageApi(api_client)
# Read image file and conver it into base64 string
image_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../samples/latin.png')
# Create request body
body = OCRRecognizeImageBody(
image=utils.file_to_base64(image_file_path),
settings=OCRSettingsRecognizeImage(
language=Language("English"),
makeSkewCorrect=False,
makeBinarization=False,
makeSpellCheck=False,
makeContrastCorrection=False,
makeUpsampling=False,
dsrMode=DsrMode("NoDsrNoFilter"),
dsrConfidence=DsrConfidence("Default"),
resultType=ResultType("Text")
),
)
try:
# Step 1: perform post request
task_id = api_instance.post_recognize_image(
body,
)
print(f'Your task ID is {task_id}')
# Step 2: perform get result request
task_response : OCRResponse = api_instance.get_recognize_image(
id=task_id
)
assert task_response.response_status_code == 'Ok'
assert task_response.task_status == 'Completed'
recognized_text_raw = task_response.results[0].data
recognized_text = bytearray(base64.b64decode(str(recognized_text_raw))).decode('utf-8')
print (f'Recognized text:\n{recognized_text}')
print (f'Task completed.Press Enter to continue')
input()
except aspose_ocr_cloud.ApiException as e:
print("Exception when calling RecognizeImageApi: %s\n" % e)
```
_________________________
### Structure
This project includes:
- Python console demo application - "[./example](./example/run.py)"
- Module "asposeocrcloud" - this is SDK located in "[./asposeocrcloud](asposeocrcloud)". You can integrate it in your application.
- Module "test" - "[./test](./test)" UnitTest. You can take a look at them to see various code examples.
- Folder "docs" - "[./docs](./docs)" Full documentation for Aspose.OCR SDK in HTML format.
### Dependencies
- Python 3.9
- [See requirements.txt](./requirements.txt)
_________________________
## Aspose.OCR Cloud SDKs
||||||
|--------------|----------|-------|---------|---------|
|[.NET & Core](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-dotnet)|[Java](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-java)|[Python](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-python)|[Node.js](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-nodejs)|[Android](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-android)
[Product Page](https://products.aspose.cloud/ocr/) | [Documentation](https://docs.aspose.cloud/display/ocrcloud/Home) | [API Reference](https://apireference.aspose.cloud/ocr/) | [Code Samples](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-nodejs) | [Blog](https://blog.aspose.cloud/category/ocr/) | [Free Support](https://forum.aspose.cloud/c/ocr) | [Free Trial](https://dashboard.aspose.cloud/#/apps)
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/aspose-ocr-cloud/",
"name": "aspose-ocr-cloud",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Aspose, OCR, Aspose OCR Cloud 5.0 API",
"author": "Aspose",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/1e/08/b7ecb773718d85a0470748bec0d533da556d015ba6c40c92f6401d17407e/aspose_ocr_cloud-24.11.0.tar.gz",
"platform": null,
"description": "# Aspose.OCR Cloud for Python SDK 24.11.0\r\n\r\n![PyPI](https://img.shields.io/pypi/v/aspose-ocr-cloud) ![PyPI - Format](https://img.shields.io/pypi/format/aspose-ocr-cloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/aspose-ocr-cloud) [![GitHub license](https://img.shields.io/github/license/aspose-ocr-cloud/aspose-ocr-cloud-python)](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-python/blob/master/LICENSE)\r\n\r\n[Aspose.OCR Cloud](https://products.aspose.cloud/ocr/) is an optical character recognition as a service. With it, you can easily add OCR functionality to almost any device or platform, including netbooks, mini PCs, or even entry-level smartphones.\r\n\r\nOur engine can read text from images, photos, screenshots and scanned PDFs in a wide variety of European, Cyrillic and Oriental fonts, returning results in the most popular document formats. Powerful built-in image processing filters based on neural networks automatically correct skewed and distorted images, automatically remove dirt, smudges, scratches, glare and other image defects that can affect recognition accuracy. To further improve the results, Aspose.OCR Cloud has a built-in spell checker that automatically replaces misspelled words and saves you the trouble of manually correcting the recognition results.\r\n\r\nEven the complex recognition tasks can be done with a couple of API calls. To make interacting with Aspose.OCR Cloud services from Python applications even easier, we provide the software development kit (SDK) for Python. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple classes.\r\n\r\nAspose.OCR Cloud SDK for Python is open source under the MIT license. You can freely use it for any projects, including commercial and proprietary applications, as well as modify any part of its code.\r\n\r\n## Try Online\r\n[Image to Text](https://products.aspose.app/ocr/scan-image) | [Image to Searchable PDF](https://products.aspose.app/ocr/ocr-to-pdf) | [PDF OCR](https://products.aspose.app/ocr/pdf-ocr)| [Receipt Scanner](https://products.aspose.app/ocr/scan-receipt)\r\n:---: | :---: | :---:| :---:\r\n[![Scan Image](https://products.aspose.app/ocr/scan-image/img/ocr-recognize-48.png)](https://products.aspose.app/ocr/scan-image) | [![Image to Searchable PDF](https://products.aspose.app/ocr/scan-image/img/ocr-to-pdf-4-48.png)](https://products.aspose.app/ocr/ocr-to-pdf) | [![PDF OCR](https://products.aspose.app/ocr/scan-image/img/ocr-to-pdf-2-48.png)](https://products.aspose.app/ocr/pdf-ocr) | [![Receipt Scanner](https://products.aspose.app/ocr/scan-image/img/aspose-scan-receipt-48.png)](https://products.aspose.app/ocr/scan-receipt) \r\n\r\n\r\n## What was changed in version 24.11.0\r\n\r\n\r\nA summary of recent changes, enhancements and bug fixes in **Aspose.OCR Cloud SDK for Java 24.11.0** release:\r\n\r\nKey | Summary | Category\r\n--- | ------- | --------\r\nOCR-3977 | Added recognition of the Uyghur language, including mixed Uyghur/English texts. | New feature\r\nOCR-3978 | Added recognition of the Telugu language, including mixed Telugu/English texts. | New feature\r\nOCR-3979 | Added recognition of the Kannada language, including mixed Kannada/English texts. | New feature\r\nOCR-3980 | Added recognition of the Tamil language, including mixed Tamil/English texts. | New feature\r\nOCR-3985 | Added recognition of the Devanagari-based scripts, including mixed Devanagari/English texts. | New feature\r\nOCR-3986 | Added support for mixed Arabic/English texts. | Enhancement\r\nOCR-3984 | Added support for mixed Japanese/English texts. | Enhancement\r\nOCR-3983 | Added support for mixed Korean/English texts. | Enhancement\r\nOCR-3982 | Added support for mixed Chinese/English texts. | Enhancement\r\nOCR-3987 | Added support for mixed Persian/English texts. | Enhancement\r\n\r\nREST API changes: https://releases.aspose.cloud/ocr/release-notes/2024/aspose-ocr-cloud-24-11-0-release-notes/\r\n\r\n#### New recognition languages\r\n\r\nThe following recognition languages have been added:\r\n\r\nScript | REST API\r\n---------- | --------\r\nUyghur | `Language.Uyghur`\r\nTelugu | `Language.Telugu`\r\nKannada | `Language.Kannada`\r\nTamil | `Language.Tamil`\r\nDevanagari-based languages | `Language.Devanagari`\r\n\r\n\r\nAll of the OCR languages mentioned above also support the recognition of mixed texts, including those with Latin characters.\r\n\r\n### Mixed language support\r\n\r\nAspose.OCR Cloud now supports the recognition of texts which include both native and Latin characters for the following languages:\r\n\r\n- Arabic (`Language.Arabic`)\r\n- Chinese (`Language.Chinese`)\r\n- Japanese (`Language.Japanese`)\r\n- Korean (`Language.Korean`)\r\n- Persian (`Language.Persian`)\r\n\r\n#### Updated public APIs:\r\n\r\n_No changes_\r\n\r\n#### Removed public APIs:\r\n\r\n_No changes._\r\n\r\n## Quickstart\r\n\r\nMake your solution using [SDK](#asposeocr-cloud-sdks), follow these steps:\r\n\r\n#### 1. Get API keys if you haven't\r\n\r\nMake a personal account on [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/) and click _Get Keys_. These keys are useful for all Aspose Cloud products. If you have any trouble, look at this [detailed manual](https://docs.aspose.cloud/total/create-new-app-and-get-app-key-and-sid/).\r\n\r\n#### 2. Run Demo\r\n\r\n * Checkout the SDK or get from [pip](https://pypi.org/project/aspose-ocr-cloud/) (pip install aspose-ocr-cloud)\r\n * Set Your AppSid & AppKey\r\n * Run Python console [Demo](./Example/run.py)\r\n\r\n\r\n<p align=\"center\">\r\n <a title=\"Download ZIP\" href=\"https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-python/archive/master.zip\">\r\n <img src=\"testdata/download.png\" />\r\n </a>\r\n</p>\r\n\r\n---------------------------\r\n\r\n\r\n## OCR in Python\r\n\r\n```python\r\n# Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).\r\n\r\n\t\r\n with aspose_ocr_cloud.ApiClient(config) as api_client:\r\n # Create an instance of the API class\r\n api_instance = recognize_image_api.RecognizeImageApi(api_client)\r\n\r\n # Read image file and conver it into base64 string\r\n image_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../samples/latin.png')\r\n\r\n # Create request body\r\n body = OCRRecognizeImageBody(\r\n image=utils.file_to_base64(image_file_path),\r\n settings=OCRSettingsRecognizeImage(\r\n language=Language(\"English\"),\r\n makeSkewCorrect=False,\r\n makeBinarization=False,\r\n makeSpellCheck=False,\r\n makeContrastCorrection=False,\r\n makeUpsampling=False,\r\n dsrMode=DsrMode(\"NoDsrNoFilter\"),\r\n dsrConfidence=DsrConfidence(\"Default\"),\r\n resultType=ResultType(\"Text\")\r\n ),\r\n )\r\n try:\r\n # Step 1: perform post request\r\n task_id = api_instance.post_recognize_image(\r\n body,\r\n )\r\n print(f'Your task ID is {task_id}')\r\n\r\n # Step 2: perform get result request\r\n task_response : OCRResponse = api_instance.get_recognize_image(\r\n id=task_id\r\n )\r\n assert task_response.response_status_code == 'Ok'\r\n assert task_response.task_status == 'Completed'\r\n recognized_text_raw = task_response.results[0].data\r\n recognized_text = bytearray(base64.b64decode(str(recognized_text_raw))).decode('utf-8')\r\n print (f'Recognized text:\\n{recognized_text}')\r\n print (f'Task completed.Press Enter to continue')\r\n input()\r\n\r\n except aspose_ocr_cloud.ApiException as e:\r\n print(\"Exception when calling RecognizeImageApi: %s\\n\" % e)\r\n\r\n```\r\n_________________________\r\n\r\n### Structure\r\n\r\nThis project includes: \r\n- Python console demo application - \"[./example](./example/run.py)\"\r\n- Module \"asposeocrcloud\" - this is SDK located in \"[./asposeocrcloud](asposeocrcloud)\". You can integrate it in your application.\r\n- Module \"test\" - \"[./test](./test)\" UnitTest. You can take a look at them to see various code examples.\r\n- Folder \"docs\" - \"[./docs](./docs)\" Full documentation for Aspose.OCR SDK in HTML format.\r\n\r\n### Dependencies\r\n- Python 3.9\r\n- [See requirements.txt](./requirements.txt)\r\n_________________________\r\n\r\n\r\n## Aspose.OCR Cloud SDKs\r\n\r\n||||||\r\n|--------------|----------|-------|---------|---------|\r\n|[.NET & Core](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-dotnet)|[Java](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-java)|[Python](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-python)|[Node.js](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-nodejs)|[Android](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-android)\r\n\r\n\r\n[Product Page](https://products.aspose.cloud/ocr/) | [Documentation](https://docs.aspose.cloud/display/ocrcloud/Home) | [API Reference](https://apireference.aspose.cloud/ocr/) | [Code Samples](https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-nodejs) | [Blog](https://blog.aspose.cloud/category/ocr/) | [Free Support](https://forum.aspose.cloud/c/ocr) | [Free Trial](https://dashboard.aspose.cloud/#/apps)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Aspose OCR Cloud 5.0 API",
"version": "24.11.0",
"project_urls": {
"Homepage": "https://pypi.org/project/aspose-ocr-cloud/"
},
"split_keywords": [
"aspose",
" ocr",
" aspose ocr cloud 5.0 api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d641c88a41a4b643f47d5dfc91cad0a4e30d5c32a7f105b1092c1a04f8366441",
"md5": "7d4b138117c86f60b577a580600c3927",
"sha256": "c156107f48b6987c542c7657744a25295405de2acd60df7538a313d2705d8697"
},
"downloads": -1,
"filename": "aspose_ocr_cloud-24.11.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7d4b138117c86f60b577a580600c3927",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 143217,
"upload_time": "2024-11-21T22:43:05",
"upload_time_iso_8601": "2024-11-21T22:43:05.569721Z",
"url": "https://files.pythonhosted.org/packages/d6/41/c88a41a4b643f47d5dfc91cad0a4e30d5c32a7f105b1092c1a04f8366441/aspose_ocr_cloud-24.11.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1e08b7ecb773718d85a0470748bec0d533da556d015ba6c40c92f6401d17407e",
"md5": "d42dacd7ea3be81b67a76edab8c85353",
"sha256": "64ac1a08d06fa0046c5ddbe5c8ec128823981fe15d9402aea5b7f331776eafb1"
},
"downloads": -1,
"filename": "aspose_ocr_cloud-24.11.0.tar.gz",
"has_sig": false,
"md5_digest": "d42dacd7ea3be81b67a76edab8c85353",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 56133,
"upload_time": "2024-11-21T22:43:07",
"upload_time_iso_8601": "2024-11-21T22:43:07.566089Z",
"url": "https://files.pythonhosted.org/packages/1e/08/b7ecb773718d85a0470748bec0d533da556d015ba6c40c92f6401d17407e/aspose_ocr_cloud-24.11.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-21 22:43:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "aspose-ocr-cloud"
}