Analyze Document

Arguments

  • image_file: str = None
  • json_file: str = None
  • bucket_name: str = None

Analyzes an input document for relationships between detected items

param image_file:
 filepath (or object name) of image file
param json_file:
 filepath to resulting json file
param bucket_name:
 if given then using image_file from the bucket
return:analysis response in json

Create Bucket

Arguments

  • bucket_name: str = None

Create S3 bucket with name

param bucket_name:
 name for the bucket
return:boolean indicating status of operation

Create Queue

Arguments

  • queue_name: str = None

Create queue with name

param queue_name:
 [description], defaults to None
return:create queue response as dict

Delete Bucket

Arguments

  • bucket_name: str = None

Delete S3 bucket with name

param bucket_name:
 name for the bucket
return:boolean indicating status of operation

Delete Files

Arguments

  • bucket_name: str = None
  • files: list = None

Delete files in the bucket

param bucket_name:
 name for the bucket
param files:list of files to delete
return:number of files deleted or False

Delete Message

Arguments

  • receipt_handle: str = None

Delete message in the queue

param receipt_handle:
 message handle to delete
return:delete message response as dict

Delete Queue

Arguments

  • queue_name: str = None

Delete queue with name

param queue_name:
 [description], defaults to None
return:delete queue response as dict

Detect Document Text

Arguments

  • image_file: str = None
  • json_file: str = None
  • bucket_name: str = None

Detects text in the input document.

param image_file:
 filepath (or object name) of image file
param json_file:
 filepath to resulting json file
param bucket_name:
 if given then using image_file from the bucket
return:analysis response in json

Detect Entities

Arguments

  • text: str = None
  • lang=en

Inspects text for named entities, and returns information about them

param text:A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters
param lang:language code of the text, defaults to "en"

Detect Sentiment

Arguments

  • text: str = None
  • lang=en

Inspects text and returns an inference of the prevailing sentiment

param text:A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters
param lang:language code of the text, defaults to "en"

Download Files

Arguments

  • bucket_name: str = None
  • files: list = None
  • target_directory: str = None

Download files from bucket to local filesystem

param bucket_name:
 name for the bucket
param files:list of S3 object names
param target_directory:
 location for the downloaded files, default current directory
return:number of files downloaded

Get Cells

Arguments

[summary]

return:[description]

Get Tables

Arguments

[summary]

return:[description]

Get Words

Arguments

[summary]

return:[description]

Init Comprehend Client

Arguments

  • aws_key_id: str = None
  • aws_key: str = None
  • region: str = None
  • use_robocloud_vault: bool = False

Initialize AWS Comprehend client

param aws_key_id:
 access key ID
param aws_key:secret access key
param region:AWS region
param use_robocloud_vault:
 use secret stored into Robocloud Vault

Init S3 Client

Arguments

  • aws_key_id: str = None
  • aws_key: str = None
  • region: str = None
  • use_robocloud_vault: bool = False

Initialize AWS S3 client

param aws_key_id:
 access key ID
param aws_key:secret access key
param region:AWS region
param use_robocloud_vault:
 use secret stored into Robocloud Vault

Init Sqs Client

Arguments

  • aws_key_id: str = None
  • aws_key: str = None
  • region: str = None
  • queue_url: str = None
  • use_robocloud_vault: bool = False

Initialize AWS SQS client

param aws_key_id:
 access key ID
param aws_key:secret access key
param region:AWS region
param queue_url:
 SQS queue url
param use_robocloud_vault:
 use secret stored into Robocloud Vault

Init Textract Client

Arguments

  • aws_key_id: str = None
  • aws_key: str = None
  • region: str = None
  • use_robocloud_vault: bool = False

Initialize AWS Textract client

param aws_key_id:
 access key ID
param aws_key:secret access key
param region:AWS region
param use_robocloud_vault:
 use secret stored into Robocloud Vault

List Buckets

Arguments

List all buckets for this account

return:list of buckets

List Files

Arguments

  • bucket_name

List files in the bucket

param bucket_name:
 name for the bucket
return:list of files

Receive Message

Arguments

Receive message from queue

return:message as dict

Send Message

Arguments

  • message: str = None
  • message_attributes: dict = None

Send message to the queue

param message:body of the message
param message_attributes:
 attributes of the message
return:send message response as dict

Set Robocloud Vault

Arguments

  • vault_name

Set Robocloud Vault name

param vault_name:
 Robocloud Vault name

Upload File

Arguments

  • bucket_name: str = None
  • filename: str = None
  • object_name: str = None

Upload single file into bucket

If object_name is not given then basename of the file is used as object_name.

param bucket_name:
 name for the bucket
param filename:filepath for the file to be uploaded
param object_name:
 name of the object in the bucket, defaults to None
return:tuple of upload status and error

Upload Files

Arguments

  • bucket_name: str = None
  • files: list = None

Upload multiple files into bucket

Giving files as list of filepaths:
['/path/to/file1.txt', '/path/to/file2.txt']
Giving files as list of dictionaries (including filepath and object name):
[{'filepath':'/path/to/file1.txt', 'object_name': 'file1.txt'}, {'filepath': '/path/to/file2.txt', 'object_name': 'file2.txt'}]
param bucket_name:
 name for the bucket
param files:list of files (2 possible ways, see above)
return:number of files uploaded