Skip to main content

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"
  }

Metadata

Release files for schadem-cdk-construct-textract-generic-async 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schadem-cdk-construct-textract-generic-async 0.0.4
File Size Uploaded
schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz 123.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for schadem-cdk-construct-textract-generic-async 0.0.4
File Interpreter ABI Platform
schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 246.1 kB

Release files / schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz

Download URL schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz
Size 123.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e63b98ad9b49fa29a203d867205a5ee905e4cb34a843492dd142b2e52f9ed2b2
BLAKE2b-256 checksum
How to use checksums
fa986c059d6a5e8c93d4a115d7242d77df5fdbe2df34931955f659d1c2c07a09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl

Download URL schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl
Size 122.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92fc93ad52fd35905b8fb852a6596a8dbeb86b1aba94caa938e1b378571b4962
BLAKE2b-256 checksum
How to use checksums
cdca59c07e3bbb2f52514127d4819845689a826726dbcb30c313836e5d27bd50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page