我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用workflow.Workflow()。
def today(): now = datetime.datetime.now() url = 'http://gank.io/api/day/' + now.strftime("%Y/%m/%d") r = web.get(url) # throw an error if request failed, Workflow will catch this and show it to the user r.raise_for_status() ganks = [] data = r.json() # ???? results = data['results'] # ???? #print(results) categories = data['category'] results = data['results'] for category in categories: for gank in results[category]: ganks.append(gank) return ganks
def wf(): global _wf if _wf is None: _wf = Workflow() return _wf
def wf(): """Return `Workflow` object for this module. Returns: workflow.Workflow: `Workflow` object for current workflow. """ global _wf if _wf is None: _wf = workflow.Workflow() return _wf
def wf(): """Lazy `Workflow` object.""" global _wf if _wf is None: _wf = workflow.Workflow() return _wf
def wf(): global _wf if _wf is None: _wf = workflow.Workflow() return _wf
def wf(): """Return Workflow object for this module. Returns: workflow.Workflow: Workflow object for current workflow. """ global _wf if _wf is None: _wf = workflow.Workflow() return _wf
def __init__(self): self.wf = Workflow(update_settings=WF_CONFIG, libraries=['./lib'])