Index
routes
¶
Dashboard API routes.
All routes are prefixed with /api for clear API namespace separation.
Classes¶
SheetSummary
¶
Bases: BaseModel
Summarized sheet information for list views.
JobSummary
¶
Bases: BaseModel
Summarized job information for list views.
Functions¶
from_checkpoint
classmethod
¶
Create from CheckpointState.
Source code in src/marianne/dashboard/routes/__init__.py
JobDetail
¶
Bases: BaseModel
Full job details including sheet information.
Functions¶
from_checkpoint
classmethod
¶
Create from CheckpointState.
Source code in src/marianne/dashboard/routes/__init__.py
JobStatusResponse
¶
Bases: BaseModel
Focused status information for job monitoring.
Functions¶
from_checkpoint
classmethod
¶
Create from CheckpointState.
Source code in src/marianne/dashboard/routes/__init__.py
JobListResponse
¶
Bases: BaseModel
Response for job list endpoint.
Functions¶
resolve_job_workspace
¶
Resolve workspace path from job state's worktree path.
Only works for worktree-isolated jobs. Non-isolated jobs do not store a workspace path in state, so this function will raise 404 for them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
CheckpointState
|
Loaded checkpoint state (must have worktree_path set). |
required |
job_id
|
str
|
Job identifier (for error messages). |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Resolved workspace Path. |
Raises:
| Type | Description |
|---|---|
HTTPException
|
404 if no worktree_path is set on the state. |
Source code in src/marianne/dashboard/routes/__init__.py
get_job_or_404
async
¶
Load job state or raise 404 if not found.
Consolidates the repeated load→check→raise pattern used across multiple route handlers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend
|
StateBackend
|
State backend to load from. |
required |
job_id
|
str
|
Job identifier. |
required |
Returns:
| Type | Description |
|---|---|
CheckpointState
|
Loaded CheckpointState. |
Raises:
| Type | Description |
|---|---|
HTTPException
|
404 if job not found. |
Source code in src/marianne/dashboard/routes/__init__.py
list_jobs
async
¶
list_jobs(status=None, limit=50, backend=Depends(get_state_backend))
List all jobs with optional status filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
JobStatus | None
|
Filter by job status (optional) |
None
|
limit
|
int
|
Maximum number of jobs to return |
50
|
backend
|
StateBackend
|
State backend (injected) |
Depends(get_state_backend)
|
Returns:
| Type | Description |
|---|---|
JobListResponse
|
List of job summaries |
Source code in src/marianne/dashboard/routes/__init__.py
get_job
async
¶
get_job(job_id, backend=Depends(get_state_backend))
Get detailed information about a specific job.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
Unique job identifier |
required |
backend
|
StateBackend
|
State backend (injected) |
Depends(get_state_backend)
|
Returns:
| Type | Description |
|---|---|
JobDetail
|
Full job details |
Raises:
| Type | Description |
|---|---|
HTTPException
|
404 if job not found |
Source code in src/marianne/dashboard/routes/__init__.py
get_job_status
async
¶
get_job_status(job_id, backend=Depends(get_state_backend))
Get focused status information for a job.
Lightweight endpoint for polling job progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_id
|
str
|
Unique job identifier |
required |
backend
|
StateBackend
|
State backend (injected) |
Depends(get_state_backend)
|
Returns:
| Type | Description |
|---|---|
JobStatusResponse
|
Job status summary |
Raises:
| Type | Description |
|---|---|
HTTPException
|
404 if job not found |