TextractClient#
Auto-generated documentation for Textract type annotations stubs module types-boto3-textract.
TextractClient#
Type annotations and code completion for boto3.client("textract")
.
boto3 documentation
# TextractClient usage example
from boto3.session import Session
from types_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 types_boto3_textract.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
can_paginate#
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:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("textract").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
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)
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)
create_adapter_version#
Creates a new version of an adapter.
Type annotations and code completion for boto3.client("textract").create_adapter_version
method.
boto3 documentation
# create_adapter_version method definition
def create_adapter_version(
self,
*,
AdapterId: str,
DatasetConfig: AdapterVersionDatasetConfigTypeDef, # (1)
OutputConfig: OutputConfigTypeDef, # (2)
ClientRequestToken: str = ...,
KMSKeyId: str = ...,
Tags: Mapping[str, str] = ...,
) -> CreateAdapterVersionResponseTypeDef: # (3)
...
- See AdapterVersionDatasetConfigTypeDef
- See OutputConfigTypeDef
- See CreateAdapterVersionResponseTypeDef
# create_adapter_version method usage example with argument unpacking
kwargs: CreateAdapterVersionRequestRequestTypeDef = { # (1)
"AdapterId": ...,
"DatasetConfig": ...,
"OutputConfig": ...,
}
parent.create_adapter_version(**kwargs)
delete_adapter#
Deletes an Amazon Textract adapter.
Type annotations and code completion for boto3.client("textract").delete_adapter
method.
boto3 documentation
# delete_adapter method definition
def delete_adapter(
self,
*,
AdapterId: str,
) -> dict[str, Any]:
...
# delete_adapter method usage example with argument unpacking
kwargs: DeleteAdapterRequestRequestTypeDef = { # (1)
"AdapterId": ...,
}
parent.delete_adapter(**kwargs)
delete_adapter_version#
Deletes an Amazon Textract adapter version.
Type annotations and code completion for boto3.client("textract").delete_adapter_version
method.
boto3 documentation
# delete_adapter_version method definition
def delete_adapter_version(
self,
*,
AdapterId: str,
AdapterVersion: str,
) -> dict[str, Any]:
...
# delete_adapter_version method usage example with argument unpacking
kwargs: DeleteAdapterVersionRequestRequestTypeDef = { # (1)
"AdapterId": ...,
"AdapterVersion": ...,
}
parent.delete_adapter_version(**kwargs)
detect_document_text#
Detects text in the input document.
Type annotations and code completion for boto3.client("textract").detect_document_text
method.
boto3 documentation
# detect_document_text method definition
def detect_document_text(
self,
*,
Document: DocumentTypeDef, # (1)
) -> DetectDocumentTextResponseTypeDef: # (2)
...
# detect_document_text method usage example with argument unpacking
kwargs: DetectDocumentTextRequestRequestTypeDef = { # (1)
"Document": ...,
}
parent.detect_document_text(**kwargs)
get_adapter#
Gets configuration information for an adapter specified by an AdapterId, returning information on AdapterName, Description, CreationTime, AutoUpdate status, and FeatureTypes.
Type annotations and code completion for boto3.client("textract").get_adapter
method.
boto3 documentation
# get_adapter method definition
def get_adapter(
self,
*,
AdapterId: str,
) -> GetAdapterResponseTypeDef: # (1)
...
# get_adapter method usage example with argument unpacking
kwargs: GetAdapterRequestRequestTypeDef = { # (1)
"AdapterId": ...,
}
parent.get_adapter(**kwargs)
get_adapter_version#
Gets configuration information for the specified adapter version, including: AdapterId, AdapterVersion, FeatureTypes, Status, StatusMessage, DatasetConfig, KMSKeyId, OutputConfig, Tags and EvaluationMetrics.
Type annotations and code completion for boto3.client("textract").get_adapter_version
method.
boto3 documentation
# get_adapter_version method definition
def get_adapter_version(
self,
*,
AdapterId: str,
AdapterVersion: str,
) -> GetAdapterVersionResponseTypeDef: # (1)
...
# get_adapter_version method usage example with argument unpacking
kwargs: GetAdapterVersionRequestRequestTypeDef = { # (1)
"AdapterId": ...,
"AdapterVersion": ...,
}
parent.get_adapter_version(**kwargs)
get_document_analysis#
Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.
Type annotations and code completion for boto3.client("textract").get_document_analysis
method.
boto3 documentation
# get_document_analysis method definition
def get_document_analysis(
self,
*,
JobId: str,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetDocumentAnalysisResponseTypeDef: # (1)
...
# get_document_analysis method usage example with argument unpacking
kwargs: GetDocumentAnalysisRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.get_document_analysis(**kwargs)
get_document_text_detection#
Gets the results for an Amazon Textract asynchronous operation that detects text in a document.
Type annotations and code completion for boto3.client("textract").get_document_text_detection
method.
boto3 documentation
# get_document_text_detection method definition
def get_document_text_detection(
self,
*,
JobId: str,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetDocumentTextDetectionResponseTypeDef: # (1)
...
# get_document_text_detection method usage example with argument unpacking
kwargs: GetDocumentTextDetectionRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.get_document_text_detection(**kwargs)
get_expense_analysis#
Gets the results for an Amazon Textract asynchronous operation that analyzes invoices and receipts.
Type annotations and code completion for boto3.client("textract").get_expense_analysis
method.
boto3 documentation
# get_expense_analysis method definition
def get_expense_analysis(
self,
*,
JobId: str,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetExpenseAnalysisResponseTypeDef: # (1)
...
# get_expense_analysis method usage example with argument unpacking
kwargs: GetExpenseAnalysisRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.get_expense_analysis(**kwargs)
get_lending_analysis#
Gets the results for an Amazon Textract asynchronous operation that analyzes text in a lending document.
Type annotations and code completion for boto3.client("textract").get_lending_analysis
method.
boto3 documentation
# get_lending_analysis method definition
def get_lending_analysis(
self,
*,
JobId: str,
MaxResults: int = ...,
NextToken: str = ...,
) -> GetLendingAnalysisResponseTypeDef: # (1)
...
# get_lending_analysis method usage example with argument unpacking
kwargs: GetLendingAnalysisRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.get_lending_analysis(**kwargs)
get_lending_analysis_summary#
Gets summarized results for the StartLendingAnalysis
operation,
which analyzes text in a lending document.
Type annotations and code completion for boto3.client("textract").get_lending_analysis_summary
method.
boto3 documentation
# get_lending_analysis_summary method definition
def get_lending_analysis_summary(
self,
*,
JobId: str,
) -> GetLendingAnalysisSummaryResponseTypeDef: # (1)
...
# get_lending_analysis_summary method usage example with argument unpacking
kwargs: GetLendingAnalysisSummaryRequestRequestTypeDef = { # (1)
"JobId": ...,
}
parent.get_lending_analysis_summary(**kwargs)
list_adapter_versions#
List all version of an adapter that meet the specified filtration criteria.
Type annotations and code completion for boto3.client("textract").list_adapter_versions
method.
boto3 documentation
# list_adapter_versions method definition
def list_adapter_versions(
self,
*,
AdapterId: str = ...,
AfterCreationTime: TimestampTypeDef = ...,
BeforeCreationTime: TimestampTypeDef = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> ListAdapterVersionsResponseTypeDef: # (1)
...
# list_adapter_versions method usage example with argument unpacking
kwargs: ListAdapterVersionsRequestRequestTypeDef = { # (1)
"AdapterId": ...,
}
parent.list_adapter_versions(**kwargs)
list_adapters#
Lists all adapters that match the specified filtration criteria.
Type annotations and code completion for boto3.client("textract").list_adapters
method.
boto3 documentation
# list_adapters method definition
def list_adapters(
self,
*,
AfterCreationTime: TimestampTypeDef = ...,
BeforeCreationTime: TimestampTypeDef = ...,
MaxResults: int = ...,
NextToken: str = ...,
) -> ListAdaptersResponseTypeDef: # (1)
...
# list_adapters method usage example with argument unpacking
kwargs: ListAdaptersRequestRequestTypeDef = { # (1)
"AfterCreationTime": ...,
}
parent.list_adapters(**kwargs)
list_tags_for_resource#
Lists all tags for an Amazon Textract resource.
Type annotations and code completion for boto3.client("textract").list_tags_for_resource
method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_tags_for_resource(**kwargs)
start_document_analysis#
Starts the asynchronous analysis of an input document for relationships between detected items such as key-value pairs, tables, and selection elements.
Type annotations and code completion for boto3.client("textract").start_document_analysis
method.
boto3 documentation
# start_document_analysis method definition
def start_document_analysis(
self,
*,
DocumentLocation: DocumentLocationTypeDef, # (1)
FeatureTypes: Sequence[FeatureTypeType], # (2)
ClientRequestToken: str = ...,
JobTag: str = ...,
NotificationChannel: NotificationChannelTypeDef = ..., # (3)
OutputConfig: OutputConfigTypeDef = ..., # (4)
KMSKeyId: str = ...,
QueriesConfig: QueriesConfigTypeDef = ..., # (5)
AdaptersConfig: AdaptersConfigTypeDef = ..., # (6)
) -> StartDocumentAnalysisResponseTypeDef: # (7)
...
- See DocumentLocationTypeDef
- See FeatureTypeType
- See NotificationChannelTypeDef
- See OutputConfigTypeDef
- See QueriesConfigTypeDef
- See AdaptersConfigTypeDef
- See StartDocumentAnalysisResponseTypeDef
# start_document_analysis method usage example with argument unpacking
kwargs: StartDocumentAnalysisRequestRequestTypeDef = { # (1)
"DocumentLocation": ...,
"FeatureTypes": ...,
}
parent.start_document_analysis(**kwargs)
start_document_text_detection#
Starts the asynchronous detection of text in a document.
Type annotations and code completion for boto3.client("textract").start_document_text_detection
method.
boto3 documentation
# start_document_text_detection method definition
def start_document_text_detection(
self,
*,
DocumentLocation: DocumentLocationTypeDef, # (1)
ClientRequestToken: str = ...,
JobTag: str = ...,
NotificationChannel: NotificationChannelTypeDef = ..., # (2)
OutputConfig: OutputConfigTypeDef = ..., # (3)
KMSKeyId: str = ...,
) -> StartDocumentTextDetectionResponseTypeDef: # (4)
...
- See DocumentLocationTypeDef
- See NotificationChannelTypeDef
- See OutputConfigTypeDef
- See StartDocumentTextDetectionResponseTypeDef
# start_document_text_detection method usage example with argument unpacking
kwargs: StartDocumentTextDetectionRequestRequestTypeDef = { # (1)
"DocumentLocation": ...,
}
parent.start_document_text_detection(**kwargs)
start_expense_analysis#
Starts the asynchronous analysis of invoices or receipts for data like contact information, items purchased, and vendor names.
Type annotations and code completion for boto3.client("textract").start_expense_analysis
method.
boto3 documentation
# start_expense_analysis method definition
def start_expense_analysis(
self,
*,
DocumentLocation: DocumentLocationTypeDef, # (1)
ClientRequestToken: str = ...,
JobTag: str = ...,
NotificationChannel: NotificationChannelTypeDef = ..., # (2)
OutputConfig: OutputConfigTypeDef = ..., # (3)
KMSKeyId: str = ...,
) -> StartExpenseAnalysisResponseTypeDef: # (4)
...
- See DocumentLocationTypeDef
- See NotificationChannelTypeDef
- See OutputConfigTypeDef
- See StartExpenseAnalysisResponseTypeDef
# start_expense_analysis method usage example with argument unpacking
kwargs: StartExpenseAnalysisRequestRequestTypeDef = { # (1)
"DocumentLocation": ...,
}
parent.start_expense_analysis(**kwargs)
start_lending_analysis#
Starts the classification and analysis of an input document.
Type annotations and code completion for boto3.client("textract").start_lending_analysis
method.
boto3 documentation
# start_lending_analysis method definition
def start_lending_analysis(
self,
*,
DocumentLocation: DocumentLocationTypeDef, # (1)
ClientRequestToken: str = ...,
JobTag: str = ...,
NotificationChannel: NotificationChannelTypeDef = ..., # (2)
OutputConfig: OutputConfigTypeDef = ..., # (3)
KMSKeyId: str = ...,
) -> StartLendingAnalysisResponseTypeDef: # (4)
...
- See DocumentLocationTypeDef
- See NotificationChannelTypeDef
- See OutputConfigTypeDef
- See StartLendingAnalysisResponseTypeDef
# start_lending_analysis method usage example with argument unpacking
kwargs: StartLendingAnalysisRequestRequestTypeDef = { # (1)
"DocumentLocation": ...,
}
parent.start_lending_analysis(**kwargs)
tag_resource#
Adds one or more tags to the specified resource.
Type annotations and code completion for boto3.client("textract").tag_resource
method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
ResourceARN: str,
Tags: Mapping[str, str],
) -> dict[str, Any]:
...
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes any tags with the specified keys from the specified resource.
Type annotations and code completion for boto3.client("textract").untag_resource
method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
ResourceARN: str,
TagKeys: Sequence[str],
) -> dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
update_adapter#
Update the configuration for an adapter.
Type annotations and code completion for boto3.client("textract").update_adapter
method.
boto3 documentation
# update_adapter method definition
def update_adapter(
self,
*,
AdapterId: str,
Description: str = ...,
AdapterName: str = ...,
AutoUpdate: AutoUpdateType = ..., # (1)
) -> UpdateAdapterResponseTypeDef: # (2)
...
# update_adapter method usage example with argument unpacking
kwargs: UpdateAdapterRequestRequestTypeDef = { # (1)
"AdapterId": ...,
}
parent.update_adapter(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("textract").get_paginator
method with overloads.
client.get_paginator("list_adapter_versions")
-> ListAdapterVersionsPaginatorclient.get_paginator("list_adapters")
-> ListAdaptersPaginator