schadem-cdk-construct-textract-generic-async
Project description
Context
This CDK Construct can be used as Step Function task and call Textract in Asynchonous mode for DetectText and AnalyzeDocument APIs.
Input
Expects a Manifest JSON at 'Payload'. Manifest description: https://pypi.org/project/schadem-tidp-manifest/
Example call in Python
textract_async_task = t_async.TextractGenericAsyncSfnTask(
self,
"textract-async-task",
s3_output_bucket=s3_output_bucket,
s3_temp_output_prefix=s3_temp_output_prefix,
integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
lambda_log_level="DEBUG",
timeout=Duration.hours(24),
input=sfn.TaskInput.from_object({
"Token":
sfn.JsonPath.task_token,
"ExecutionId":
sfn.JsonPath.string_at('$$.Execution.Id'),
"Payload":
sfn.JsonPath.entire_payload,
}),
result_path="$.textract_result")
Output
Adds the "TextractTempOutputJsonPath" to the Step Function ResultPath. At this location the Textract output is stored as individual JSON files. Use the CDK Construct schadem-cdk-construct-sfn-textract-output-config-to-json to combine them to one single JSON file.
example with ResultPath = textract_result (like configured above):
"textract_result": {
"TextractTempOutputJsonPath": "s3://schademcdkstackpaystuban-schademcdkidpstackpaystu-bt0j5wq0zftu/textract-temp-output/c6e141e8f4e93f68321c17dcbc6bf7291d0c8cdaeb4869758604c387ce91a480"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz
.
File metadata
- Download URL: schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz
- Upload date:
- Size: 123.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e63b98ad9b49fa29a203d867205a5ee905e4cb34a843492dd142b2e52f9ed2b2 |
|
MD5 | 560114559921a497e73ae5ffd0ba19be |
|
BLAKE2b-256 | fa986c059d6a5e8c93d4a115d7242d77df5fdbe2df34931955f659d1c2c07a09 |
File details
Details for the file schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl
- Upload date:
- Size: 122.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92fc93ad52fd35905b8fb852a6596a8dbeb86b1aba94caa938e1b378571b4962 |
|
MD5 | 3750e69c533c779c8c9cb9039effe142 |
|
BLAKE2b-256 | cdca59c07e3bbb2f52514127d4819845689a826726dbcb30c313836e5d27bd50 |