Models¶
All models are importable directly from pyawe:
Enumerations¶
pyawe.models.Status
¶
Bases: str, Enum
Lifecycle status shared by workflows, tasks, and jobs.
CANCELLED, REWORKED, and FAILED are task-only and
system-managed: CANCELLED is set automatically by the propagator when
a task is on a rejected decision branch; REWORKED is set only by the
manual rework trigger (POST /tasks/{id}/rework); FAILED is set
only when a checkpoint's required check is marked failed. None of these
should be set via update_task.
pyawe.models.ScheduleStatus
¶
Bases: str, Enum
Schedule health indicator shared by workflows, tasks, and jobs.
pyawe.models.TaskType
¶
Bases: str, Enum
Task execution model.
pyawe.models.PortDirection
¶
Bases: str, Enum
Direction of a task port.
pyawe.models.PortValueType
¶
Bases: str, Enum
Data type carried by a task or work item port.
SECRET is valid only on work item port specs: it declares the slot,
but the value itself is set per task instance via TaskSecretsClient
after instantiation.
pyawe.models.ScriptType
¶
Bases: str, Enum
Execution mechanism for an automated task.
pyawe.models.LoopType
¶
Bases: str, Enum
Iteration strategy for a loop block.
Auth¶
pyawe.models.LoginInfo
dataclass
¶
LoginInfo(token: str, user_id: str, email: str, username: str, roles: list[str], permissions: list[str])
Session information returned by a successful :meth:AweClient.login call.
Workflows¶
pyawe.models.Workflow
dataclass
¶
Workflow(id: UUID, name: str, is_template: bool, created_at: datetime, updated_at: datetime, status: Status, schedule_status: ScheduleStatus, is_shared: bool, created_by: str | None = None, description: str | None = None, job_id: UUID | None = None, team_id: UUID | None = None, organization_id: UUID | None = None, parent_loop_block_id: UUID | None = None, sort_order: int | None = None, story_points: int | None = None, ticket_type: str | None = None, priority: str | None = None, reporter_id: UUID | None = None, resolved_at: datetime | None = None, external_reporter_first_name: str | None = None, external_reporter_last_name: str | None = None, external_reporter_email: str | None = None, togra_workflow_id: UUID | None = None, togra_project_id: UUID | None = None, ticket_number: int | None = None, workflow_number: int | None = None, project_code: str | None = None, ephemeral: bool = False, origin_kind: str | None = None, origin_ref: str | None = None, ai_processed_at: datetime | None = None, ai_confidence: float | None = None, ai_should_route: bool | None = None, ai_outcome_feedback: str | None = None, ai_outcome_feedback_by: UUID | None = None, ai_outcome_feedback_at: datetime | None = None, ai_outcome_feedback_reason: str | None = None, ai_outcome_feedback_note_id: UUID | None = None, duplicate_of_workflow_id: UUID | None = None)
A workflow definition or instance.
organization_id
class-attribute
instance-attribute
¶
Denormalized from team_id; read-only.
sort_order
class-attribute
instance-attribute
¶
Display order within the parent job (backlog or sprint).
story_points
class-attribute
instance-attribute
¶
Story point estimate for this story-workflow.
external_reporter_first_name
class-attribute
instance-attribute
¶
Set when the reporter has no UUM user row. Cleared by an empty string,
NOT null — see :meth:WorkflowsClient.update.
ticket_number
class-attribute
instance-attribute
¶
Human-readable, globally-sequenced cunav ticket number. Read-only.
workflow_number
class-attribute
instance-attribute
¶
Per-project sequence number (e.g. the 4 in P1-W0004). Read-only.
project_code
class-attribute
instance-attribute
¶
The owning project's code, if the workflow's job is linked to one. Read-only.
ephemeral
class-attribute
instance-attribute
¶
On a template: instances cloned from it are ephemeral (deleted once finished; their history
stays, see :class:~pyawe.client.WorkflowRunsClient). On an instance: whether it is reaped.
origin_kind
class-attribute
instance-attribute
¶
What an instance was made for (e.g. "dam-asset"), set when cloning.
origin_ref
class-attribute
instance-attribute
¶
The identifier within origin_kind (e.g. an asset id).
ai_outcome_feedback
class-attribute
instance-attribute
¶
"helpful" or "unhelpful".
pyawe.models.WorkflowWithTasks
dataclass
¶
WorkflowWithTasks(workflow: Workflow, tasks: list[Task] = list(), links: list[TaskLink] = list(), project_code: str | None = None)
Workflow with its associated tasks and inter-task links.
project_code
class-attribute
instance-attribute
¶
The owning project's code, if the workflow's job is linked to one. Read-only.
Tasks¶
pyawe.models.Task
dataclass
¶
Task(id: UUID, name: str, is_template: bool, created_at: datetime, updated_at: datetime, status: Status, schedule_status: ScheduleStatus, workflow_id: UUID, is_start: bool, is_end: bool, task_type: str, created_by: str | None = None, description: str | None = None, rework_task_id: UUID | None = None, loop_block_id: UUID | None = None, assigned_to: str | None = None, start_time: datetime | None = None, end_time: datetime | None = None, decision_outcome: str | None = None, decision_input_port: str | None = None, input_values: Any | None = None, output_values: Any | None = None, is_locked: bool = False, canvas_x: float | None = None, canvas_y: float | None = None, effort: int | None = None, priority: str = 'none', due_time: datetime | None = None, branch_name: str | None = None, task_number: int | None = None, port_namespace: str | None = None, reworked_from_task_id: UUID | None = None)
A task within a workflow.
task_type
instance-attribute
¶
One of "standard", "decision", "automated", "loop_block".
loop_block_id
class-attribute
instance-attribute
¶
Set when task_type == "loop_block".
assigned_to
class-attribute
instance-attribute
¶
User UUID string; no foreign-key constraint (users live in a separate service).
decision_input_port
class-attribute
instance-attribute
¶
Input port name that drives auto-decide for decision tasks.
is_locked
class-attribute
instance-attribute
¶
When True, structural edits are blocked for non-privileged users.
effort
class-attribute
instance-attribute
¶
Unitless effort estimate (e.g. story points). None means not yet estimated.
priority
class-attribute
instance-attribute
¶
"none" (default), "low", "medium", "high", or "critical".
branch_name
class-attribute
instance-attribute
¶
Git branch this task is working against.
task_number
class-attribute
instance-attribute
¶
Sequence number within the owning project's task numbering. Read-only.
port_namespace
class-attribute
instance-attribute
¶
User-defined prefix (^[a-z][a-z0-9_]*$) used instead of t{task_number}
when a checkpoint mirrors this task's output ports.
reworked_from_task_id
class-attribute
instance-attribute
¶
Set only on a task spawned by the manual rework trigger; read-only provenance.
pyawe.models.TaskWithContext
dataclass
¶
TaskWithContext(task: Task, workflow_name: str, job_id: UUID | None = None, job_name: str | None = None, project_code: str | None = None)
A task enriched with its workflow and job names, returned by list_mine.
project_code
class-attribute
instance-attribute
¶
The owning project's code, if the job is linked to one. Read-only.
pyawe.models.TaskLink
dataclass
¶
TaskLink(from_task_id: UUID, to_task_id: UUID, branch_label: str | None = None, data_bindings: Any | None = None)
A directed edge between two tasks.
pyawe.models.DataBinding
dataclass
¶
pyawe.models.TaskPortSpec
dataclass
¶
pyawe.models.TaskPortValues
dataclass
¶
TaskPortValues(specs: list[TaskPortSpec] = list(), values: Any | None = None, secret_set: list[str] = list())
pyawe.models.TaskScript
dataclass
¶
TaskScript(id: UUID, task_id: UUID, script_type: str, timeout_secs: int, retry_limit: int, created_at: datetime, updated_at: datetime, endpoint: str | None = None, script_body: str | None = None, execution_profile_id: UUID | None = None, connection_id: UUID | None = None)
Automated execution script attached to a task.
pyawe.models.TaskRun
dataclass
¶
TaskRun(id: UUID, task_id: UUID | None, created_at: datetime, runner_id: str | None = None, started_at: datetime | None = None, completed_at: datetime | None = None, outcome: str | None = None, input_json: Any | None = None, output_json: Any | None = None, error_message: str | None = None, task_name: str | None = None, workflow_id: UUID | None = None, workflow_name: str | None = None, job_id: UUID | None = None, job_name: str | None = None, origin_kind: str | None = None, origin_ref: str | None = None)
pyawe.models.TaskTeamRole
dataclass
¶
Assignment of a team role to a task.
Jobs¶
pyawe.models.Job
dataclass
¶
Job(id: UUID, name: str, status: Status, schedule_status: ScheduleStatus, created_at: datetime, updated_at: datetime, archived: bool, team_id: UUID | None = None, organization_id: UUID | None = None, project_id: UUID | None = None, job_type: str | None = None, start_date: str | None = None, end_date: str | None = None, ai_enabled: bool = False, ai_togra_project_id: UUID | None = None, ai_togra_job_id: UUID | None = None, ai_togra_template_id: UUID | None = None, ai_route_confidence_threshold: float | None = None, ai_rules: Any | None = None, email_connection_id: UUID | None = None, inbound_email_connection_id: UUID | None = None, project_code: str | None = None, ephemeral: bool = False, auto_complete: bool = True)
A job that groups related workflow instances.
organization_id
class-attribute
instance-attribute
¶
Denormalized from team_id; read-only.
job_type
class-attribute
instance-attribute
¶
"sprint", "kanban", or "backlog"; None for legacy jobs.
start_date
class-attribute
instance-attribute
¶
ISO 8601 date string; set when job_type == "sprint".
end_date
class-attribute
instance-attribute
¶
ISO 8601 date string; set when job_type == "sprint".
ai_enabled
class-attribute
instance-attribute
¶
Only meaningful for job_type == "kanban" queues: whether new tickets
are dispatched to cunav's AI triage webhook.
ai_rules
class-attribute
instance-attribute
¶
Per-outcome-type enable/threshold config, e.g.
[{"type": "flag_duplicate", "enabled": true, "confidence_threshold": 0.6}].
project_code
class-attribute
instance-attribute
¶
The linked project's code, if any. Read-only.
ephemeral
class-attribute
instance-attribute
¶
Machine-made job: deleted once it is empty (its history is kept).
auto_complete
class-attribute
instance-attribute
¶
False: propagation never marks the job Complete (a standing container job).
pyawe.models.JobWithWorkflows
dataclass
¶
Job with its associated workflows.
Loop Blocks¶
pyawe.models.LoopBlock
dataclass
¶
LoopBlock(id: UUID, task_id: UUID, outer_workflow_id: UUID, inner_workflow_id: UUID, loop_type: str, loop_config: Any, created_at: datetime, updated_at: datetime)
A loop block that wraps an inner workflow repeated across iterations.
pyawe.models.CreateLoopBlockResponse
dataclass
¶
Response from POST /loop-blocks: the new outer task and its loop block.
Execution Profiles¶
pyawe.models.ExecutionProfile
dataclass
¶
ExecutionProfile(id: UUID, name: str, image: str, cpu_request: str, cpu_limit: str, memory_request: str, memory_limit: str, created_by: str, created_at: datetime, updated_at: datetime, description: str | None = None, image_pull_policy: str = 'IfNotPresent', enable_buildkit_sidecar: bool = False, runner_pool: str = 'default')
Approved Kubernetes execution environment for automated tasks.