aspose-ocr-cloud


Nameaspose-ocr-cloud JSON
Version 23.12.0 PyPI version JSON
download
home_pagehttps://pypi.org/project/aspose-ocr-cloud/
SummaryAspose OCR Cloud 5.0 API
upload_time2024-01-09 22:52:08
maintainer
docs_urlNone
authorAspose
requires_python>=3.7
licenseLicense
keywords openapi openapi-generator aspose ocr cloud 5.0 api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Aspose.OCR Cloud for Python SDK 23.12.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) ![GitHub last commit](https://img.shields.io/github/last-commit/Aspose-ocr-Cloud/aspose-ocr-cloud-python)

[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 23.12.0

A summary of recent changes, enhancements and bug fixes in **Aspose.OCR Cloud SDK for Python 23.12.0** release:

Key | Summary | Category
--- | ------- | --------
OCR&#8209;3737 | Added a free API for evaluating image recognition without [authorization](/ocr/authorization/).<br />Some restrictions apply. See below for details. | New feature

### Public API changes and backwards compatibility

This section lists all public API changes introduced in **Aspose.OCR Cloud SDK for Python 23.12.0** that may affect the code of existing applications.

#### Added public APIs:

The following public APIs have been introduced in this release:

##### Image recognition evaluation

The following new classes have been added:

Class | Description
----- | -----------
`RecognizeImageTrialApi` | Image recognition API that works without authorization.

**Important:** In recognition results, 10% of the words are substituted with asterisks (`*`). The sequence of masked words remains unchanged upon re-submitting the identical image for recognition.

[Learn more...](https://docs.aspose.cloud/ocr/recognize-image/)

#### 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_response = api_instance.post_recognize_image(
                body=body,
            )
            task_id = task_id_response.body
            print(f'Your task ID is {task_id}')

            # Step 2: perform get result request
            task_response : OCRResponse = api_instance.get_recognize_image(
                query_params={'id':task_id}
            )
            assert task_response.response.status == 200
            assert task_response.body['taskStatus'] == 'Completed'
            recognized_text_raw = task_response.body['results'][0]['data']
            recognized_text = bytearray(base64.b64decode(str(recognized_text_raw))).decode('utf-8')
            print (f'Recognized text:
{recognized_text}')
            print (f'Task completed.Press Enter to continue')
            input()

        except aspose_ocr_cloud.ApiException as e:
            print("Exception when calling RecognizeImageApi: %s
" % 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
- [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": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "OpenAPI,OpenAPI-Generator,Aspose OCR Cloud 5.0 API",
    "author": "Aspose",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/2b/9e/5d28a6a208e93570f2579d6d3f468dff1d51cbb40f508f21ded7f5dc7223/aspose-ocr-cloud-23.12.0.tar.gz",
    "platform": null,
    "description": "# Aspose.OCR Cloud for Python SDK 23.12.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) ![GitHub last commit](https://img.shields.io/github/last-commit/Aspose-ocr-Cloud/aspose-ocr-cloud-python)\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## What was changed in version 23.12.0\r\n\r\nA summary of recent changes, enhancements and bug fixes in **Aspose.OCR Cloud SDK for Python 23.12.0** release:\r\n\r\nKey | Summary | Category\r\n--- | ------- | --------\r\nOCR&#8209;3737 | Added a free API for evaluating image recognition without [authorization](/ocr/authorization/).<br />Some restrictions apply. See below for details. | New feature\r\n\r\n### Public API changes and backwards compatibility\r\n\r\nThis section lists all public API changes introduced in **Aspose.OCR Cloud SDK for Python 23.12.0** that may affect the code of existing applications.\r\n\r\n#### Added public APIs:\r\n\r\nThe following public APIs have been introduced in this release:\r\n\r\n##### Image recognition evaluation\r\n\r\nThe following new classes have been added:\r\n\r\nClass | Description\r\n----- | -----------\r\n`RecognizeImageTrialApi` | Image recognition API that works without authorization.\r\n\r\n**Important:** In recognition results, 10% of the words are substituted with asterisks (`*`). The sequence of masked words remains unchanged upon re-submitting the identical image for recognition.\r\n\r\n[Learn more...](https://docs.aspose.cloud/ocr/recognize-image/)\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\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_response = api_instance.post_recognize_image(\r\n                body=body,\r\n            )\r\n            task_id = task_id_response.body\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                query_params={'id':task_id}\r\n            )\r\n            assert task_response.response.status == 200\r\n            assert task_response.body['taskStatus'] == 'Completed'\r\n            recognized_text_raw = task_response.body['results'][0]['data']\r\n            recognized_text = bytearray(base64.b64decode(str(recognized_text_raw))).decode('utf-8')\r\n            print (f'Recognized text:\r\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\r\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- [See requirements.txt](./requirements.txt)\r\n\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\r\n",
    "bugtrack_url": null,
    "license": "License",
    "summary": "Aspose OCR Cloud 5.0 API",
    "version": "23.12.0",
    "project_urls": {
        "Homepage": "https://pypi.org/project/aspose-ocr-cloud/"
    },
    "split_keywords": [
        "openapi",
        "openapi-generator",
        "aspose ocr cloud 5.0 api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4aa6eb36fea42be714a15649ed20eeed2e4ce1a55b7c5b5181239c95e65c548b",
                "md5": "2906c650f8f99f63068a0c95232e1595",
                "sha256": "f0d15f8aded13ad5e6e4bb15921dbd3c0f8224d002779e292b2e043579b5f15b"
            },
            "downloads": -1,
            "filename": "aspose_ocr_cloud-23.12.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2906c650f8f99f63068a0c95232e1595",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 374026,
            "upload_time": "2024-01-09T22:52:06",
            "upload_time_iso_8601": "2024-01-09T22:52:06.953958Z",
            "url": "https://files.pythonhosted.org/packages/4a/a6/eb36fea42be714a15649ed20eeed2e4ce1a55b7c5b5181239c95e65c548b/aspose_ocr_cloud-23.12.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b9e5d28a6a208e93570f2579d6d3f468dff1d51cbb40f508f21ded7f5dc7223",
                "md5": "700ea2bcedd10ac3c12316381e6a5a42",
                "sha256": "1b1f711afdffb8b00b21c14aa703d6c69df319c527b5ffe304abb11a232cb13a"
            },
            "downloads": -1,
            "filename": "aspose-ocr-cloud-23.12.0.tar.gz",
            "has_sig": false,
            "md5_digest": "700ea2bcedd10ac3c12316381e6a5a42",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 125285,
            "upload_time": "2024-01-09T22:52:08",
            "upload_time_iso_8601": "2024-01-09T22:52:08.672305Z",
            "url": "https://files.pythonhosted.org/packages/2b/9e/5d28a6a208e93570f2579d6d3f468dff1d51cbb40f508f21ded7f5dc7223/aspose-ocr-cloud-23.12.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 22:52:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aspose-ocr-cloud"
}
        
Elapsed time: 0.16110s