Login
Back to bricks list
Introduction Version

S3Bucket

S3Bucket class is a wrapper around boto3 S3 client to provide a simplified interface to upload and download files to and from an S3 bucket.

:raises Exception: description :return: description :rtype: type

Attributes

access_key_id: strbucket_name: strendpoint: strmessage_dispatcher: MessageDispatcherregion: strsecret_access_key: str

Functions

__INIT__
Parameters:
NameTypeDefault valueDescription
endpointstr Url of the s3 endpoint
regionstr Region of the s3 bucket
access_key_idstr Access key id
secret_access_keystr Secret access key
bucket_namestr Name of the s3 bucket
message_dispatcherMessageDispatcher A message dispatcher can be provided (from a task for example) to notify the progress of the upload/download , optional
GET_OBJECT
Parameters:
NameTypeDefault valueDescription
object_keystr
local_file_pathstr
Return type:
str
UPLOAD_FILE
Parameters:
NameTypeDefault valueDescription
file_pathstr
object_keystr