{"library":"mypy-boto3-textract","title":"mypy-boto3-textract","description":"mypy-boto3-textract provides a complete set of type annotations for the boto3 Textract service. These stubs enable static type checking for boto3 client operations, improving code quality and developer experience by catching type-related errors at development time. It is generated by the mypy-boto3-builder project and typically releases new versions in sync with boto3 updates, currently at 1.42.3.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-textract"],"cli":null},"imports":["from mypy_boto3_textract.client import TextractClient","from mypy_boto3_textract.type_defs import AnalyzeDocumentResponseTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom mypy_boto3_textract.client import TextractClient\nfrom mypy_boto3_textract.type_defs import AnalyzeDocumentResponseTypeDef, DocumentTypeDef # Import for detailed typing\n\ndef get_typed_textract_client() -> TextractClient:\n    \"\"\"\n    Demonstrates how to obtain a type-hinted Textract client.\n    The actual boto3 client is created, and the `TextractClient` type stub\n    provides static analysis for its methods.\n    \"\"\"\n    # boto3 automatically handles authentication via environment variables\n    # (e.g., AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) or other credential providers.\n    # No explicit os.environ.get is typically needed here for the stubs to function,\n    # as they primarily assist static analysis, not runtime credential fetching.\n    client: TextractClient = boto3.client(\"textract\", region_name=\"us-east-1\") # Specify region for a valid client\n    print(f\"Successfully obtained a type-hinted Textract client: {type(client)}\")\n    # You can now use 'client' with full type-hinting support\n    # For example, client.analyze_document(...)\n    return client\n\nif __name__ == '__main__':\n    typed_client = get_typed_textract_client()\n    # At this point, `typed_client` has all the type hints for the Textract service,\n    # enabling static analysis in your IDE or with mypy.\n    # A live call (e.g., typed_client.analyze_document(...)) would require\n    # valid AWS credentials and appropriate permissions at runtime.\n","lang":"python","description":"This quickstart demonstrates the core functionality of `mypy-boto3-textract`: obtaining a type-hinted `boto3` client for the Textract service. It showcases the import of the `TextractClient` type and its application when creating a `boto3.client` instance, enabling comprehensive static analysis of Textract operations without requiring live AWS credentials for the type-checking benefit itself.","tag":null,"tag_description":null,"last_tested":"2026-04-25","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":1.7,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.3M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"20.2M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"21M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.7M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.5M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.8M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.9,"import_time_s":null,"mem_mb":null,"disk_size":"18M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-textract","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}