MCPcopy Create free account
hub / github.com/diffgram/diffgram / __get_string_data

Method __get_string_data

shared/connection/s3_connector.py:81–92  ·  view source on GitHub ↗

:param opts: :return:

(self, opts)

Source from the content-addressed store, hash-verified

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):

Callers 1

fetch_dataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected