Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
TextractClient
✓ from types_boto3_textract.client import TextractClient
✗ from mypy_boto3_textract.client import TextractClient
Minimal usage: create a typed Textract client and call detect_document_text.
import boto3
from mypy_boto3_textract import TextractClient
def analyze_document() -> None:
client: TextractClient = boto3.client('textract', region_name='us-east-1',
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''))
# Example: Detect text in an S3 object
response = client.detect_document_text(
Document={'S3Object': {'Bucket': 'my-bucket', 'Name': 'my-doc.pdf'}}
)
for block in response['Blocks']:
if block['BlockType'] == 'LINE':
print(block['Text'])
Debug
Known issues
gotchaPackage is auto-generated; version numbers do not reflect the boto3 runtime version. They are sequential and can jump non-linearly.fixPin to a specific version if you need stability. Use `boto3-stubs` for all services instead of individual packages.
affects: all
deprecatedPython 3.8 support was removed in version 8.12.0 of the builder (affects types-boto3-textract released after that date).fixUpgrade to Python 3.9+ or use the last version that supported 3.8 (if available).
affects: >=1.43.0?
breakingTypeDef names for packed arguments changed in builder v8.9.0 (e.g., removed 'Request' suffix from some names). Code importing specific TypeDef names may break.fixDo not rely on autogenerated TypeDef names directly; use the module's public API or inspect the stubs after upgrading.
affects: depends on build date
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency required for type stubs to work
typing-extensionsoptionalNeeded for compatibility with Python <3.11