aws-samples / amazon-textract-code-samples

Amazon Textract Code Samples
MIT No Attribution
406 stars 263 forks source link

Textract-Caller importing package for call_textract() #14

Closed Llum97 closed 2 years ago

Llum97 commented 3 years ago

I'm having trouble using the call_textract() function for paginated outputs in the recent package you created.

Referring to https://github.com/aws-samples/amazon-textract-textractor/tree/master/caller After successfully installing the dependencies, what am I suppose to import?

schadem commented 2 years ago

The https://github.com/aws-samples/amazon-textract-code-samples/blob/master/python/textract-textractor-tools.ipynb does have a sample.

from textractcaller import call_textract
def call_textract(input_document: Union[str, bytearray],
                  features: List[Textract_Features] = None,
                  output_config: OutputConfig = None,
                  kms_key_id: str = None,
                  job_tag: str = None,
                  notification_channel: NotificationChannel = None,
                  client_request_token: str = None,
                  return_job_id: bool = False,
                  force_async_api: bool = False) -> dict: