当前位置: 首页>>代码示例>>Python>>正文


Python Workspace.get_object_provenance方法代码示例

本文整理汇总了Python中biokbase.workspace.client.Workspace.get_object_provenance方法的典型用法代码示例。如果您正苦于以下问题:Python Workspace.get_object_provenance方法的具体用法?Python Workspace.get_object_provenance怎么用?Python Workspace.get_object_provenance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在biokbase.workspace.client.Workspace的用法示例。


在下文中一共展示了Workspace.get_object_provenance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Workspace

# 需要导入模块: from biokbase.workspace.client import Workspace [as 别名]
# 或者: from biokbase.workspace.client.Workspace import get_object_provenance [as 别名]
                                    1, est.strftime('%Y-%m-%dT%H:%M:%S+0000'))
        else:
            logger.info("Workspace objects transformed to {0}".format(external_type))

        #
        # TODO validation of data files after transform
        #

        # Step 2: Extract provenance and metadata
        try:    
            workspaceClient = Workspace(url=workspace_service_url, token=kb_token)
        
            object_info = {"workspace": workspace_name, "name": object_name}

            object_details = dict()
            object_details["provenance"] = workspaceClient.get_object_provenance([object_info])
            object_details["metadata"] = workspaceClient.get_object_info_new({"objects":[object_info], "includeMetadata":1})
            
            #logger.debug(object_details["metadata"])
            
            # redundant information
            #object_details["references"] = workspaceClient.list_referencing_objects([object_info])

            # seems like maybe too crazy per download
            #object_details["history"] = workspaceClient.get_object_history(object_info)

            object_version = object_details["metadata"][0][4]
        
            object_metadata_filename = "KBase_object_details_{0}_{1}_v{2}.json".format(workspace_name, object_name, object_version)
            file_name = os.path.join(transform_directory, object_metadata_filename)
        
开发者ID:brettin,项目名称:transform,代码行数:32,代码来源:trns_download_taskrunner.py


注:本文中的biokbase.workspace.client.Workspace.get_object_provenance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。