本文整理汇总了Python中biokbase.workspace.client.Workspace.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Workspace.__init__方法的具体用法?Python Workspace.__init__怎么用?Python Workspace.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biokbase.workspace.client.Workspace
的用法示例。
在下文中一共展示了Workspace.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from biokbase.workspace.client import Workspace [as 别名]
# 或者: from biokbase.workspace.client.Workspace import __init__ [as 别名]
def __init__(self, url=None, token=None, user_id=None, password=None, wsid=None,
create=False, **create_kw):
"""Constructor.
:param url: URL of remote WS service
:type url: str
:param token: Authorization token, overrides 'user_id'/'password'
:type token: str
:param user_id: User ID for authentication (overridden by 'token')
:type user_id: str
:param user_id: Password for authentication (overridden by 'token')
:type user_id: str
:param wsid: Workspace ID or name
:type wsid: str
:param create_kw: Any extra keywords to create a new workspace
:type create_kw: None or dict
:raise: ValueError if workspace id is empty, KeyError if there is no workspace by that name,
WorkspaceException if creation of the workspace fails.
"""
WS2.__init__(self, url=url, user_id=user_id, password=password, token=token)
self.has_wsid = False
if wsid is not None:
self._init_ws(wsid, create_kw)
self.has_wsid = True