Python
botcity.plugins.aws.textract.plugin.BotAWSTextractPlugin
¶
entries: List[List]
property
readonly
¶
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 of entries. |
render_rate: int
property
writable
¶
The render resolution rate
Returns:
Type | Description |
---|---|
int |
resolution rate |
textract_client: <function Session.client at 0x7f1d2b1f2c00>
property
readonly
¶
Returns the aws client instance.
Returns:
Type | Description |
---|---|
boto3_instance |
The aws client instance. |
__init__(self, region_name='us-east-1', use_credentials_file=True, access_key_id=None, secret_access_key=None)
special
¶
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(self)
¶
Get the full text from the image.
Returns:
Type | Description |
---|---|
str |
The full text. |
read(self, 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 |
Exceptions:
Type | Description |
---|---|
ValueError |
If file is not an image or PDF. |