--- title: "wallaroo.task_run" type: docs linkTitle: "wallaroo.task_run" ---
class TaskRun(wallaroo.object.Object):

Base class for all backend GraphQL API objects.

This class serves as a framework for API objects to be constructed based on a partially-complete JSON response, and to fill in their remaining members dynamically if needed.

TaskRun( client: wallaroo.client.Client, data: Dict[str, Any], standalone=False)

Base constructor.

Each object requires:

- a GraphQL client - in order to fill its missing members dynamically
- an initial data blob - typically from unserialized JSON, contains at
- least the data for required members (typically the object's primary key) and optionally other data members.

def logs(self, limit: Optional[int] = None) -> wallaroo.task_run.TaskRunLogs:

Returns the application logs for the given Task Run. These may be `print` or Exception logs running your Orchestration.

Note: The default retention policy for Orchestration logs is 30 days.

###### Parameters

- limit int Limits the number of lines of logs returned. Starts from the most recent logs.

###### Returns

> A List of str. Each str represents a newline-separated entry from the Task's log. :

class TaskRunList(typing.List[wallaroo.task_run.TaskRun]):

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

##### Inherited Members

builtins.list
  list
  clear
  copy
  append
  insert
  extend
  pop
  remove
  index
  count
  reverse
  sort

class TaskRunLogs(typing.List[str]):

This is a list of logs associated with a Task run.

##### Inherited Members

builtins.list
  list
  clear
  copy
  append
  insert
  extend
  pop
  remove
  index
  count
  reverse
  sort