Skip to content

Commit 4bdcf7e

Browse files
zeryxlemonez
andauthored
good doc string
Co-authored-by: lemonez <[email protected]>
1 parent be67da0 commit 4bdcf7e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Algorithmia/datafile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ def getFile(self, as_path=False):
5252
return open(f.name)
5353

5454
def getAsZip(self):
55+
"""Download/decompress file/directory and return path to file/directory.
56+
57+
Expects the `DataFile` object to point to a zip-compatible data API location.
58+
Either returns the directory or a path to the file, depending on whether a directory or file was zipped.
59+
"""
5560
local_file_path = self.getFile(as_path=True)
5661
directory_path = tempfile.mkdtemp()
5762
with zipfile.ZipFile(local_file_path, 'r') as ziph:

0 commit comments

Comments
 (0)