Source code for allensdk.internal.api.api_prerelease
import shutil
from allensdk.api.api import Api
[docs]class ApiPrerelease(Api):
'''Extends allensdk.api.api to copy files 'locally' from shared storage.
'''
[docs] def retrieve_file_from_storage(self, storage_path, save_file_path):
'''Copy data from path to file_name.
Parameters
----------
storage_path : string
path to file in shared directory (copy source)
save_file_name : string
path to file destination (copy target)
'''
self._file_download_log.info("Downloading PATH: %s", storage_path)
self._file_download_log.debug("To PATH: %s", save_file_path)
# TODO: exception handling
shutil.copyfile(storage_path, save_file_path)