Skip to main content

unified interface to google vision, aws textract, azure & tesseract OCR tools.

Project description


Downloads contributors PyPi tag mit-license

Unified interface to google vision, aws textract, azure, tesseract and other OCR tools

The Core objective of OcrPy is to let users OCR, Archive, Index and Search any documents with ease, with a simple and intuitive interface and a powerful Pipeline API.

ocrpy achieves this by wrapping around various OCR engines like Tesseract OCR, Aws Textract, Google Cloud Vision and Azure Computer Vision. It unifies the multitude of interfaces provided by a wide range of cloud tools & other open-source libraries and provides a simple, easy-to-use interface for the user.

Getting Started

ocrpy is a Python-only package hosted on PyPI. The recommended installation method is pip

pip install ocrpy

Day-to-Day Usage

Ocrpy Provides various levels of abstraction for the user to perform OCR on various types of documents. The recommended and the best way to use Ocrpy is to use it through it's pipelines API as shown below.

The Pipeline API can be invoked in two ways. The first method is to define the config for running the pipeline as a yaml file and and then run the pipeline by loading it as follows:

   from ocrpy import TextOcrPipeline

   ocr_pipeline = TextOcrPipeline.from_config("ocrpy_config.yaml")

alternatively you can also run a pipeline by directly instantiating the pipeline class as follows:

   from ocrpy import TextOcrPipeline

   pipeline = TextOcrPipeline(source_dir='s3://document_bucket/', 
                              credentials_config={"AWS": "path/to/aws-credentials.env/file", 
                                           "GCP": "path/to/gcp-credentials.json/file"})

:memo: For a more detailed set of examples and tutorials on how you could use ocrpy for your usecase can be found at ocrpy documentation.

Support and Documentation

  • For an in-depth reference of the ocrpy API refer our API docs.
  • For inspiration on how to use ocrpy for your usecase, check out our tutorials or our examples.
  • If you're interested in understanding how ocrpy works, check out our Ocrpy Overview.

Feedback and Contributions

  • If you have any questions, Feedback or notice something wrong, please open an issue on GitHub Issues.
  • If you are interested in contributing to the project, please open a PR on GitHub Pull Requests.
  • Or if you just want to say hi, feel free to contact us.


If you wish to cite this project, feel free to use this BibTeX reference:

    title={Ocrpy: OCR, Archive, Index and Search any documents with ease},
    publisher = {GitHub},
    howpublished = {\url{}}

License and Credits

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocrpy-0.3.10.tar.gz (74.6 MB view hashes)

Uploaded source

Built Distribution

ocrpy-0.3.10-py3-none-any.whl (28.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page