in src/stepfunctions/workflow/stepfunctions.py [0:0]
def get_output(self, wait=False):
"""
Get the output for the workflow execution.
Args:
wait (bool, optional): Boolean flag set to `True` if the call should wait for a running workflow execution to end before returning the output. Set to `False`, otherwise. Note that if the status is running, and `wait` is set to `True`, this will be a blocking call. (default: False)
Returns:
list or dict: Workflow execution output.
"""
while wait and self.describe()['status'] == 'RUNNING':
time.sleep(1)
output = self.describe().get('output', None)
if output is None:
return output
return json.loads(output)