Skip to content

Python

botcity.plugins.aws.textract.BotAWSTextractPlugin

entries property

Get the list of entries after reading the file.

Each element contains a list of values in which are: text, x1, y1, x2, y2, x3, y3, x4, y4 and page.

Returns:

Type Description
List[List]

List[List]: List of entries.

render_rate property writable

The render resolution rate

Returns:

Name Type Description
int int

resolution rate

textract_client property

Returns the aws client instance.

Returns:

Name Type Description
boto3_instance client

The aws client instance.

__init__(region_name='us-east-1', use_credentials_file=True, access_key_id=None, secret_access_key=None)

BotAWSTextractPlugin

Parameters:

Name Type Description Default
region_name str

Default region when creating new connections.

'us-east-1'
use_credentials_file bool

If set to True will make authentication via AWS credentials file.

True
access_key_id str

AWS access key ID.

None
secret_access_key str

AWS secret access key.

None

full_text()

Get the full text from the image.

Returns:

Name Type Description
str str

The full text.

read(filepath, **kwargs)

Read the file and set the entries list.

Parameters:

Name Type Description Default
filepath str

The file path for the image or PDF to be read.

required

Raises:

Type Description
ValueError

If file is not an image or PDF.