TextractClient#
Auto-generated documentation for Textract type annotations stubs module mypy-boto3-textract.
TextractClient#
Type annotations and code completion for boto3.client("textract")
.
boto3 documentation
# TextractClient usage example
from boto3.session import Session
from mypy_boto3_textract.client import TextractClient
def get_textract_client() -> TextractClient:
return Session().client("textract")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("textract").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("textract")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.BadDocumentException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.DocumentTooLargeException,
client.exceptions.HumanLoopQuotaExceededException,
client.exceptions.IdempotentParameterMismatchException,
client.exceptions.InternalServerError,
client.exceptions.InvalidJobIdException,
client.exceptions.InvalidKMSKeyException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidS3ObjectException,
client.exceptions.LimitExceededException,
client.exceptions.ProvisionedThroughputExceededException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ThrottlingException,
client.exceptions.UnsupportedDocumentException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_textract.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
analyze_document#
Analyzes an input document for relationships between detected items.
Type annotations and code completion for boto3.client("textract").analyze_document
method.
boto3 documentation
# analyze_document method definition
def analyze_document(
self,
*,
Document: DocumentTypeDef, # (1)
FeatureTypes: Sequence[FeatureTypeType], # (2)
HumanLoopConfig: HumanLoopConfigTypeDef = ..., # (3)
QueriesConfig: QueriesConfigTypeDef = ..., # (4)
AdaptersConfig: AdaptersConfigTypeDef = ..., # (5)
) -> AnalyzeDocumentResponseTypeDef: # (6)
...
- See DocumentTypeDef
- See FeatureTypeType
- See HumanLoopConfigTypeDef
- See QueriesConfigTypeDef
- See AdaptersConfigTypeDef
- See AnalyzeDocumentResponseTypeDef
# analyze_document method usage example with argument unpacking
kwargs: AnalyzeDocumentRequestRequestTypeDef = { # (1)
"Document": ...,
"FeatureTypes": ...,
}
parent.analyze_document(**kwargs)
analyze_expense#
AnalyzeExpense
synchronously analyzes an input document for financially
related relationships between
text.
Type annotations and code completion for boto3.client("textract").analyze_expense
method.
boto3 documentation
# analyze_expense method definition
def analyze_expense(
self,
*,
Document: DocumentTypeDef, # (1)
) -> AnalyzeExpenseResponseTypeDef: # (2)
...
# analyze_expense method usage example with argument unpacking
kwargs: AnalyzeExpenseRequestRequestTypeDef = { # (1)
"Document": ...,
}
parent.analyze_expense(**kwargs)
analyze_id#
Analyzes identity documents for relevant information.
Type annotations and code completion for boto3.client("textract").analyze_id
method.
boto3 documentation
# analyze_id method definition
def analyze_id(
self,
*,
DocumentPages: Sequence[DocumentTypeDef], # (1)
) -> AnalyzeIDResponseTypeDef: # (2)
...
# analyze_id method usage example with argument unpacking
kwargs: AnalyzeIDRequestRequestTypeDef = { # (1)
"DocumentPages": ...,
}
parent.analyze_id(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("textract").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("textract").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_adapter#
Creates an adapter, which can be fine-tuned for enhanced performance on user provided documents.
Type annotations and code completion for boto3.client("textract").create_adapter
method.
boto3 documentation
# create_adapter method definition
def create_adapter(
self,
*,
AdapterName: str,
FeatureTypes: Sequence[FeatureTypeType], # (1)
ClientRequestToken: str = ...,
Description: str = ...,
AutoUpdate: AutoUpdateType = ..., # (2)
Tags: Mapping[str, str] = ...,
) -> CreateAdapterResponseTypeDef: # (3)
...
# create_adapter method usage example with argument unpacking
kwargs: CreateAdapterRequestRequestTypeDef = { # (1)
"AdapterName": ...,
"FeatureTypes": ...,
}
parent.create_adapter(**kwargs)