{"id":27491,"library":"types-boto3-textract","title":"types-boto3-textract","description":"Type annotations for the boto3 Textract service, generated by mypy-boto3-builder. Version 1.43.0 provides static type checking support for AWS Textract API calls. The package follows the boto3-stubs release cadence and is updated when boto3 service models change.","status":"active","version":"1.43.0","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type-annotations","boto3","textract","aws","mypy"],"install":[{"cmd":"pip install types-boto3-textract","lang":"bash","label":"Install types-boto3-textract"}],"dependencies":[{"reason":"Runtime dependency required for type stubs to work","package":"boto3","optional":false},{"reason":"Needed for compatibility with Python <3.11","package":"typing-extensions","optional":true}],"imports":[{"note":"Wrong import path; types are in mypy_boto3_textract namespace.","wrong":"from boto3.client import TextractClient","symbol":"TextractClient","correct":"from mypy_boto3_textract.client import TextractClient"},{"note":"Wrong import path; use the typed stub package.","wrong":"from boto3.resource import TextractServiceResource","symbol":"TextractServiceResource","correct":"from mypy_boto3_textract.service_resource import TextractServiceResource"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_textract import TextractClient\n\ndef analyze_document() -> None:\n    client: TextractClient = boto3.client('textract', region_name='us-east-1',\n                                           aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),\n                                           aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''))\n    # Example: Detect text in an S3 object\n    response = client.detect_document_text(\n        Document={'S3Object': {'Bucket': 'my-bucket', 'Name': 'my-doc.pdf'}}\n    )\n    for block in response['Blocks']:\n        if block['BlockType'] == 'LINE':\n            print(block['Text'])\n","lang":"python","description":"Minimal usage: create a typed Textract client and call detect_document_text."},"warnings":[{"fix":"Pin to a specific version if you need stability. Use `boto3-stubs` for all services instead of individual packages.","message":"Package is auto-generated; version numbers do not reflect the boto3 runtime version. They are sequential and can jump non-linearly.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.9+ or use the last version that supported 3.8 (if available).","message":"Python 3.8 support was removed in version 8.12.0 of the builder (affects types-boto3-textract released after that date).","severity":"deprecated","affected_versions":">=1.43.0?"},{"fix":"Do not rely on autogenerated TypeDef names directly; use the module's public API or inspect the stubs after upgrading.","message":"TypeDef 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.","severity":"breaking","affected_versions":"depends on build date"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install types-boto3-textract` and import `mypy_boto3_textract`.","cause":"The package is installed as 'types-boto3-textract', but the import module is 'mypy_boto3_textract'.","error":"ModuleNotFoundError: No module named 'mypy_boto3_textract'"},{"fix":"Add `from mypy_boto3_textract import TextractClient` and annotate your client variable.","cause":"Did not import the typed stubs. boto3 itself does not have type annotations.","error":"AttributeError: module 'boto3' has no attribute 'client' with type hints"},{"fix":"Either upgrade Python to 3.9+ or use `typing.List` instead of `list` in your code.","cause":"Using Python <3.9 with `list[str]` style annotations; the stubs use `from __future__ import annotations` but older Python may not support them.","error":"TypeError: 'type' object is not subscriptable"},{"fix":"Reinstall package: `pip install --upgrade types-boto3-textract`. Also ensure your IDE is using the correct Python interpreter.","cause":"IDE cache issues or incorrect package version. Sometimes the stub files are missing.","error":"Cannot find reference 'TextractClient' in 'mypy_boto3_textract'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}