Skip to content

Document

Source code in docs_src/capo_textract/types/document.py
class Document(TypedDict, closed=True):
    bytes: NotRequired["capo_textract.types.image_blob.ImageBlob"]
    """<p>A blob of base64-encoded document bytes. The maximum size of a document that's provided in a blob of bytes is 5 MB. The document bytes must be in PNG or JPEG format.</p> <p>If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes passed using the <code>Bytes</code> field. </p>"""
    s3_object: NotRequired["capo_textract.types.s3_object.S3Object"]
    """<p>Identifies an S3 object as the document source. The maximum size of a document that's stored in an S3 bucket is 5 MB.</p>"""

bytes instance-attribute

bytes: NotRequired[ImageBlob]

A blob of base64-encoded document bytes. The maximum size of a document that's provided in a blob of bytes is 5 MB. The document bytes must be in PNG or JPEG format.

If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes passed using the Bytes field.

s3_object instance-attribute

s3_object: NotRequired[S3Object]

Identifies an S3 object as the document source. The maximum size of a document that's stored in an S3 bucket is 5 MB.