Skip to main content

ocrpy

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")
   ocr_pipeline.process()

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/', 
                              destination_dir="gs://processed_document_bucket/outputs/", 
                              parser_backend='aws-textract', 
                              credentials_config={"AWS": "path/to/aws-credentials.env/file", 
                                           "GCP": "path/to/gcp-credentials.json/file"})
   pipeline.process()

: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.

Citation

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

@misc{ocrpy,
    title={Ocrpy: OCR, Archive, Index and Search any documents with ease},
    author={maxentlabs},
    year={2022},
    publisher = {GitHub},
    howpublished = {\url{https://github.com/maxent-ai/ocrpy}}
}

License and Credits

Release files for ocrpy 0.3.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ocrpy 0.3.10
File Size Uploaded
ocrpy-0.3.10.tar.gz 74.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ocrpy 0.3.10
File Interpreter ABI Platform
ocrpy-0.3.10-py3-none-any.whl Python 3 none any Details

Total release size: 74.6 MB

Release files / ocrpy-0.3.10.tar.gz

Download URL ocrpy-0.3.10.tar.gz
Size 74.6 MB
Tags Source
SHA-256 checksum
How to use checksums
af594c478d0b5a07492b8652aeb44b957006ee8380ebbe0f4c367aedfec4e840
BLAKE2b-256 checksum
How to use checksums
9b9fbffbc9c20630ba219ad3339de9715930ef3eea8cf08a132e63259725ce9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.22.0

Release files / ocrpy-0.3.10-py3-none-any.whl

Download URL ocrpy-0.3.10-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
212517a595bfa233694eaec8bc2c085bccbe367d8276047db67042e67e1858e6
BLAKE2b-256 checksum
How to use checksums
452ff747648776ac4a20fdb168aede29f33b4c94544f778e67ba00512bb371ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.22.0

Release history Release notifications | RSS feed

This release

0.3.10 This release

2 release files

0.3.9

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page