:param opts: :return:
(self, opts)
| 79 | |
| 80 | @with_connection |
| 81 | def __get_string_data(self, opts): |
| 82 | """ |
| 83 | |
| 84 | :param opts: |
| 85 | :return: |
| 86 | """ |
| 87 | bytes_buffer = io.BytesIO() |
| 88 | self.connection_client.download_fileobj(Bucket = opts['bucket_name'], Key = opts['path'], |
| 89 | Fileobj = bytes_buffer) |
| 90 | byte_value = bytes_buffer.getvalue() |
| 91 | str_value = byte_value.decode() # python3, default decoding is utf-8 |
| 92 | return {'data': str_value} |
| 93 | |
| 94 | @with_connection |
| 95 | def __fetch_object(self, opts): |