Amazon Textract Helper tools for pretty printing
Project description
Textract-PrettyPrinter
Provides functions to format the output received from Textract in more easily consumable formats incl. CSV or Markdown. amazon-textract-prettyprinter
Install
> python -m pip install amazon-textract-prettyprinter
Make sure your environment is setup with AWS credentials through configuration files or environment variables or an attached role. (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
Samples
Get FORMS and TABLES as CSV
from textractcaller.t_call import call_textract, Textract_Features
from textractprettyprinter.t_pretty_print import Pretty_Print_Table_Format, Textract_Pretty_Print, get_string
textract_json = call_textract(input_document=input_document, features=[Textract_Features.FORMS, Textract_Features.TABLES])
print(get_string(textract_json=textract_json, table_format=Pretty_Print_Table_Format.csv))
Get string for TABLES using the get_string method
from textractcaller.t_call import call_textract, Textract_Features
from textractprettyprinter.t_pretty_print import Textract_Pretty_Print, get_string
textract_json = call_textract(input_document=input_document, features=[Textract_Features.TABLES])
get_string(textract_json=textract_json, output_type=Textract_Pretty_Print.TABLES)
Print out tables in LaTeX format
from textractcaller.t_call import call_textract, Textract_Features
from textractprettyprinter.t_pretty_print import Textract_Pretty_Print, get_string
textract_json = call_textract(input_document=input_document, features=[Textract_Features.FORMS, Textract_Features.TABLES])
get_tables_string(textract_json=textract_json, table_format=Pretty_Print_Table_Format.latex)
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
Close
Hashes for amazon-textract-prettyprinter-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7ffa35d64b5c69be868a3b05d9912f8ad5e08e9f260e2b6cf8f73b93bf507cd |
|
MD5 | 162aff6bf894a360e9a3837ce5a5f684 |
|
BLAKE2b-256 | 868d317d2061c02a2b6212c46021b120ef166eeb5f048a1098316862a303f621 |
Close
Hashes for amazon_textract_prettyprinter-0.0.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dae29e5ed1a146c500d979965469cf798c7818226ff7b20013598f43683e04bf |
|
MD5 | ef74b8ee3f816448e6a010c9fc688344 |
|
BLAKE2b-256 | 15a617839d22e77ab5a1c4679027e096884d4811358bd55a3b451221a6aa1ae1 |