{"id":5564,"library":"amazon-textract-caller","title":"Amazon Textract Caller","description":"This library provides a simplified Python interface for making API calls to Amazon Textract, streamlining direct Textract interactions. As of its latest PyPI release (0.2.4), it primarily focuses on facilitating raw API requests and responses. However, active development has largely shifted to the `amazon-textract-textractor` library, which offers more comprehensive document parsing and utility features. The `amazon-textract-caller` package itself has not seen updates since January 2021.","status":"abandoned","version":"0.2.4","language":"en","source_language":"en","source_url":"https://github.com/aws-samples/amazon-textract-textractor/tree/master/caller","tags":["aws","textract","document processing","ocr","cloud"],"install":[{"cmd":"pip install amazon-textract-caller","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required for interacting with AWS Textract API.","package":"boto3","optional":false}],"imports":[{"symbol":"get_textract_response","correct":"from amazon_textract_caller import get_textract_response"},{"symbol":"TextractFeatures","correct":"from amazon_textract_caller import TextractFeatures"}],"quickstart":{"code":"import os\nfrom amazon_textract_caller import get_textract_response, TextractFeatures\n\n# Configure AWS credentials and region (e.g., via environment variables or AWS CLI config)\n# os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', '')\n# os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', '')\n# os.environ['AWS_DEFAULT_REGION'] = os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')\n\n# Replace with your actual S3 document URI (e.g., \"s3://your-bucket/your-document.pdf\")\ns3_document_uri = \"s3://YOUR_BUCKET/YOUR_DOCUMENT.pdf\"\n\ntry:\n    # Call Textract API with specified features\n    # This package returns the raw JSON response from Textract.\n    response = get_textract_response(\n        input_document=s3_document_uri,\n        features=[TextractFeatures.FORMS, TextractFeatures.TABLES]\n    )\n    print(\"Textract API call successful. Raw JSON response received:\")\n    # print(response) # Uncomment to see the full raw Textract JSON response\n    print(f\"Detected {len(response.get('Blocks', []))} blocks.\")\n    \n    print(\"\\nNote: For higher-level parsing and object models, consider the `amazon-textract-textractor` library.\")\n\nexcept Exception as e:\n    print(f\"Error during Textract API call: {e}\")\n    print(\"Ensure valid AWS credentials, correct S3 URI, and appropriate permissions.\")\n","lang":"python","description":"This quickstart demonstrates how to use `amazon-textract-caller` to invoke the Amazon Textract API for a document stored in S3. It will return the raw JSON response from Textract. Ensure your AWS credentials and region are configured (e.g., via environment variables or AWS CLI)."},"warnings":[{"fix":"For new projects, or if needing current features, bug fixes, or higher-level parsing, it is strongly recommended to migrate to the `amazon-textract-textractor` library. This package might not be compatible with newer Textract API features or `boto3` versions.","message":"The `amazon-textract-caller` PyPI package (version 0.2.4) has not been updated since January 2021 and is effectively abandoned as a standalone package. Its functionality has been largely superseded and extended by the actively maintained `amazon-textract-textractor` library (v1.x), which resides in the same GitHub repository.","severity":"breaking","affected_versions":"0.2.4 and older"},{"fix":"If advanced document parsing, structured data extraction (e.g., easy access to key-value pairs, tables, or entity recognition), and an object-oriented representation of the document are required, consider `amazon-textract-textractor` for a more feature-rich experience.","message":"This library is primarily a direct wrapper for the Textract API, returning raw Textract JSON responses. It does not provide the higher-level parsing, data extraction, and convenient object model utilities (like accessing forms or tables as Python objects) that are available in the `amazon-textract-textractor` library.","severity":"gotcha","affected_versions":"0.2.4 and older"},{"fix":"Ensure your AWS environment is correctly configured with valid credentials and permissions for Textract. Regularly monitor your AWS Textract usage and associated costs in the AWS console.","message":"This library relies on `boto3` for AWS API calls, which requires properly configured AWS credentials (e.g., via environment variables like `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, or AWS CLI configuration). Textract API calls incur costs based on usage.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}