exlab_wizard.api.routers.browse#

/tree and /run/{path} browse endpoints. Backend Spec §4.6.1.

Two endpoints back the Frontend’s tree view (Frontend §3.6) and run detail panel (Frontend §3.6.2):

  • GET /tree – equipment / project / run hierarchy.

  • GET /run/{path} – single-run detail (template, operator, sync status, run kind, README content).

The router walks the local filesystem under each configured equipment root via os.scandir (the same iterator the validator uses for audit-mode walks; §4.5). creation.json is decoded via msgspec.json.decode per §4.4.5.

Functions

build_browse_router()

Construct the /tree + /run router.

Classes

EquipmentNode(**data)

ProjectNode(**data)

RunDetail(**data)

RunNode(**data)

TreeResponse(**data)

class exlab_wizard.api.routers.browse.EquipmentNode(**data)[source]#

Bases: BaseModel

Parameters:

data (Any)

id: str#
label: str#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

path: str#
projects: list[ProjectNode]#
class exlab_wizard.api.routers.browse.ProjectNode(**data)[source]#

Bases: BaseModel

Parameters:

data (Any)

has_creation_json: bool#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

path: str#
runs: list[RunNode]#
short_id: str#
test_runs: list[RunNode]#
class exlab_wizard.api.routers.browse.RunDetail(**data)[source]#

Bases: BaseModel

Parameters:

data (Any)

label: str | None#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

operator: str | None#
path: str#
plugins_applied: list[dict[str, Any]]#
readme: str | None#
run_kind: str | None#
schema_version: str | None#
sync_status: str | None#
template: dict[str, Any] | None#
validation_overrides: list[dict[str, Any]]#
class exlab_wizard.api.routers.browse.RunNode(**data)[source]#

Bases: BaseModel

Parameters:

data (Any)

has_creation_json: bool#
kind: str#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
path: str#
sync_status: str | None#
class exlab_wizard.api.routers.browse.TreeResponse(**data)[source]#

Bases: BaseModel

Parameters:

data (Any)

equipment: list[EquipmentNode]#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

exlab_wizard.api.routers.browse.build_browse_router()[source]#

Construct the /tree + /run router.

Return type:

APIRouter