cloud_modules_aws/utils.py
def read_from_s3(self, bucket, file_to_read) -> io.BytesIO:
        """
        returns an io buffer handle to read from
        """

        if self.s3_client is None:
            self.set_s3_client()

        response = None
        try:
            logger.debug("reading file: %s from bucket: %s",
                         file_to_read, bucket)
            response = self.s3_client.get_object(
                Bucket=bucket, Key=file_to_read)
            return self.get_bytes_io_buffer(response["Body"].read())
        except Exception as err:
            logger.error("%s: %s", type(err), err)
        return response

        returns an io buffer handle to read from
        
returns an io buffer handle to read from
returns an io buffer handle to read from
def read_from_s3(self, bucket, file_to_read) -> io.BytesIO:
        if self.s3_client is None:
            self.set_s3_client()
        response = None
        try:
            logger.debug("reading file: %s from bucket: %s",
                         file_to_read, bucket)
            response = self.s3_client.get_object(
                Bucket=bucket, Key=file_to_read)
            return self.get_bytes_io_buffer(response["Body"].read())
        except Exception as err:
            logger.error("%s: %s", type(err), err)
        return response
def read_from_s3 ( self , bucket , file_to_read ) -> io . BytesIO : if self . s3_client is None : self . set_s3_client ( ) response = None try : logger . debug ( "reading file: %s from bucket: %s" , file_to_read , bucket ) response = self . s3_client . get_object ( Bucket = bucket , Key = file_to_read ) return self . get_bytes_io_buffer ( response [ "Body" ] . read ( ) ) except Exception as err : logger . error ( "%s: %s" , type ( err ) , err ) return response
returns an io buffer handle to read from
returns an io buffer handle to read from
"""
        returns an io buffer handle to read from
        """
self
bucket
file_to_read