本文整理匯總了Python中girder_client.GirderClient.loadOrCreateFolder方法的典型用法代碼示例。如果您正苦於以下問題:Python GirderClient.loadOrCreateFolder方法的具體用法?Python GirderClient.loadOrCreateFolder怎麽用?Python GirderClient.loadOrCreateFolder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類girder_client.GirderClient
的用法示例。
在下文中一共展示了GirderClient.loadOrCreateFolder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: upload_benchmark_results
# 需要導入模塊: from girder_client import GirderClient [as 別名]
# 或者: from girder_client.GirderClient import loadOrCreateFolder [as 別名]
def upload_benchmark_results(benchmark_bin, api_key=None):
hostname = socket.gethostname().lower()
results_dir = os.path.join(benchmark_bin, 'BenchmarkResults',
hostname)
if not os.path.exists(results_dir):
sys.stderr.write('Expected results directory does not exist: ' + results_dir)
sys.exit(1)
from girder_client import GirderClient
gc = GirderClient(apiUrl='https://data.kitware.com/api/v1')
gc.authenticate(apiKey=api_key)
# ITK/PerformanceBenchmarkingResults
folder_id = '5af50c818d777f06857985e3'
hostname_folder = gc.loadOrCreateFolder(hostname, folder_id, 'folder')
gc.upload(os.path.join(results_dir, '*.json'), hostname_folder['_id'],
leafFoldersAsItems=False, reuseExisting=True)
開發者ID:InsightSoftwareConsortium,項目名稱:ITKPerformanceBenchmarking,代碼行數:17,代碼來源:evaluate-itk-performance.py