Perform OCR using Google's Drive API v3
Project description
Google OCR (Drive API v3)
Perform OCR using Google’s Drive API v3
Free software: GNU General Public License v3
Documentation: https://google-drive-ocr.readthedocs.io.
Usage
To use google_drive_ocr
in a project:
from google_drive_ocr.application import GoogleOCRApplication app = GoogleOCRApplication('Google OCR', 'client_secrets.json') # Single image app.perform_ocr('image.png') # Multiple images app.perform_batch_ocr(['image_1.png', 'image_2.png', 'image_3.png']) # Multiple Images using multiprocessing app.perform_batch_ocr(['image_1.png', 'image_3.png', 'image_2.png'], workers=2)
To use google_drive_ocr
from command line:
# Single image google-ocr -i image.png # Multiple images google-ocr -b image_1.png image_2.png image_3.png # All files from a directory google-ocr --image-dir images/ --extension .png # Multiple images using multiprocessing google-ocr -b image_1.png image_2.png image_3.png --workers 2 # For more detailed Usage google-ocr --help
Note:
You must setup a Google application and download client_secrets.json
file before using google_drive_ocr.
Setup Instructions
Create a project on Google Cloud Platform
Wizard: https://console.developers.google.com/start/api?id=drive
Instructions:
Select application type as “Installed Application”
Create credentials OAuth consent screen –> OAuth client ID
Save
client_secret.json
Features
Perform OCR using Google’s Drive API v3
Single, Batch and Parallel OCR
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2021-06-14)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for google_drive_ocr-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0887afc25c93c931434d776685a55dc1da4654d91bed1c0bd03ead1ea44a9f8c |
|
MD5 | d8b2740bf978f5ba45024bb9ba706c5a |
|
BLAKE2b-256 | 56dfdc36711d9667785295853eb670abe397a911654f2a456364d793b27085e6 |