We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be67da0 commit 4bdcf7eCopy full SHA for 4bdcf7e
Algorithmia/datafile.py
@@ -52,6 +52,11 @@ def getFile(self, as_path=False):
52
return open(f.name)
53
54
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
+ """
60
local_file_path = self.getFile(as_path=True)
61
directory_path = tempfile.mkdtemp()
62
with zipfile.ZipFile(local_file_path, 'r') as ziph:
0 commit comments