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 0b0c398 commit be67da0Copy full SHA for be67da0
Algorithmia/datafile.py
@@ -159,6 +159,10 @@ def putNumpy(self, array):
159
raise DataApiError("Attempted to .putNumpy() a file without numpy available, please install numpy.")
160
161
def putAsZip(self, path):
162
+ """Zip file/directory and upload to data API location defined by `DataFile` object.
163
+
164
+ Accepts either a single file or a directory containing other files and directories.
165
+ """
166
temp = tempfile.NamedTemporaryFile(delete=False).name
167
if os.path.isdir(path):
168
with zipfile.ZipFile(temp, 'w') as ziph:
0 commit comments