MCPcopy Index your code
hub / github.com/algorithmiaio/algorithmia-python / getBytes

Method getBytes

Algorithmia/datafile.py:217–224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

215 return name
216
217 def getBytes(self):
218 exists, error = self.existsWithError()
219 if not exists:
220 raise DataApiError('unable to get file {} - {}'.format(self.path, error))
221 f = open(self.path, 'rb')
222 bts = f.read()
223 f.close()
224 return bts
225
226 def getString(self):
227 exists, error = self.existsWithError()

Callers

nothing calls this directly

Calls 3

existsWithErrorMethod · 0.95
DataApiErrorClass · 0.90
readMethod · 0.80

Tested by

no test coverage detected