Skip to main content

textract-cli

PyPI Changelog Tests License

CLI for running files through AWS Textract

Installation

Install this tool using pip:

pip install textract-cli

Configuration

Any of the methods for configuring boto3 will work with this tool. Environment variables or a ~/.aws/config file are good options here.

Usage

To run Textract OCR against a JPEG or PNG file (must be smaller than 5MB):

textract-cli image.jpeg

This will output to standard out. To save to a file use this:

textract-cli image.jpeg > output.txt

Or use the -o/--output option like this:

textract-cli image.jpeg -o output.txt

For help, run:

textract-cli --help

You can also use:

python -m textract_cli --help

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd textract-cli
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Release files for textract-cli 0.1

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

Source distribution (sdist)

Source distribution for textract-cli 0.1
File Size Uploaded
textract-cli-0.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for textract-cli 0.1
File Interpreter ABI Platform
textract_cli-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / textract-cli-0.1.tar.gz

Download URL textract-cli-0.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ef555f6e1e52d63e8efd20e16c2fa950874a3e361a86f248755eccebdf17dffa
BLAKE2b-256 checksum
How to use checksums
a05cde8cc5e2c38e41955a9b0185e83d1c38128e176c53b87d23597fcbc4df16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / textract_cli-0.1-py3-none-any.whl

Download URL textract_cli-0.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed17add973cf94a43fc95a25ace82fb828747bb2867683cedd2cb9d2469d39e4
BLAKE2b-256 checksum
How to use checksums
fd746102999fc493cbfcfb944fd1ee4ff54831cfa2c4d672ca7df72359d8bcea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1 This release

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